Re: Speedup twophase transactions
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndquadrant.com>
To: Nikhil Sontakke <nikhils@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>,
Stas Kelvich <s.kelvich@postgrespro.ru>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>,
Jesper Pedersen <jesper.pedersen@redhat.com>, Robert Haas <robertmhaas@gmail.com>
Date: 2017-01-27T10:07:46Z
Lists: pgsql-hackers
On 27 January 2017 at 09:59, Nikhil Sontakke <nikhils@2ndquadrant.com> wrote: >>> But, I put the recovery process and the checkpointer process of the >>> standby under gdb with breakpoints on these functions, but both did >>> not hit CreateRestartPoint() as well as CheckPointGuts() when I issued >>> a promote :-| >> >> No end-of-recovery checkpoints happen at promotion since 9.3. You can >> still use fallback_promote as promote file to trigger the pre-9.2 (9.2 >> included) behavior. > > Ok, so that means, we also need to fsync out these 2PC XIDs at promote > time as well for their durability. Why? The data files haven't been fsynced either at that point. If there is a bug there it doesn't just affect 2PC. What sequence of actions would cause data loss? -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Speedup 2PC recovery by skipping two phase state files in normal path
- 728bd991c3c4 10.0 landed
-
Add tests for two-phase commit
- 30820982b295 10.0 landed
-
Improve grammar of message about two-phase state files.
- 38c363adf497 10.0 landed
-
Speedup 2PC by skipping two phase state files in normal path
- 978b2f65aa12 9.6.0 cited