Re: Speedup twophase transactions
Nikhil Sontakke <nikhils@2ndquadrant.com>
From: Nikhil Sontakke <nikhils@2ndquadrant.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: David Steele <david@pgmasters.net>,
Stas Kelvich <s.kelvich@postgrespro.ru>, Simon Riggs <simon@2ndquadrant.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>,
Jesper Pedersen <jesper.pedersen@redhat.com>, Robert Haas <robertmhaas@gmail.com>
Date: 2017-03-26T07:50:47Z
Lists: pgsql-hackers
Thanks Michael, I was away for a bit. I will take a look at this patch and get back to you soon. Regards, Nikhils On 22 March 2017 at 07:40, Michael Paquier <michael.paquier@gmail.com> wrote: > On Fri, Mar 17, 2017 at 5:15 PM, Michael Paquier > <michael.paquier@gmail.com> wrote: > > On Fri, Mar 17, 2017 at 5:00 PM, Nikhil Sontakke > > <nikhils@2ndquadrant.com> wrote: > >> Micheal, it looks like you are working on a final version of this > patch? I > >> will wait to review it from my end, then. > > > > I have to admit that I am beginning to get drawn into it... > > And here is what I got. I have found a couple of inconsistencies in > the patch, roughly: > - During recovery entries marked with ondisk = true should have their > start and end LSN reset to InvalidXLogRecPtr. This was actually > leading to some inconsistencies in MarkAsPreparing() for 2PC > transactions staying around for more than 2 checkpoints. > - RecoverPreparedTransactions(), StandbyRecoverPreparedTransactions() > and PrescanPreparedTransactions() doing both a scan of pg_twophase and > the shared memory entries was way too complicated. I have changed > things so as only memory entries are scanned by those routines, but an > initial scan of pg_twophase is done before recovery. > - Some inconsistencies in the comments and some typos found on the way. > - Simplification of some routines used in redo, as well as simplified > the set of routines made available to users. > > Tests are passing for me, an extra lookup would be nice. > -- > Michael > -- Nikhil Sontakke http://www.2ndQuadrant.com/ PostgreSQL/Postgres-XL Development, 24x7 Support, 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