Re: [HACKERS] Potential data loss of 2PC files
От | Ashutosh Bapat |
---|---|
Тема | Re: [HACKERS] Potential data loss of 2PC files |
Дата | |
Msg-id | CAFjFpRcOOEqFKDG2NdAgDPTw3SJP5ycLdPjH8rU+H-fNEJ-RQw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Potential data loss of 2PC files (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: [HACKERS] Potential data loss of 2PC files
|
Список | pgsql-hackers |
> > Well, flushing the meta-data of pg_twophase is really going to be far > cheaper than the many pages done until CheckpointTwoPhase is reached. > There should really be a check on serialized_xacts for the > non-recovery code path, but considering how cheap that's going to be > compared to the rest of the restart point stuff it is not worth the > complexity of adding a counter, for example in shared memory with > XLogCtl (the counter gets reinitialized at each checkpoint, > incremented when replaying a 2PC prepare, decremented with a 2PC > commit). So to reduce the backpatch impact I would just do the fsync > if (serialized_xact > 0 || RecoveryInProgress()) and call it a day. Sounds ok to me. I will leave it to the committer to decide further. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
В списке pgsql-hackers по дате отправления: