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-17T08:00:01Z
Lists: pgsql-hackers
> > > > > Ok, we can do that and then yes, RecoverPreparedTransaction() can just > have > > one loop going through the shmem entries. BUT, we cannot ignore > > "inredo"+"ondisk" entries. For such entries, we will have to read and > > recover from the corresponding 2PC files. > > Yes. About other things I found... In CheckPointTwoPhase(), I am > actually surprised that prepare_start_lsn and prepare_end_lsn are not > reset to InvalidXLogRecPtr when a shmem entry is flushed to disk after > ondisk is set to true, there is no need for them as the data does not > need to be fetched from WAL segments so we had better be consistent > (regression tests fail if I do that). And the two extra arguments in > MarkAsPreparing() are really unnecessary, they get set all the time to > InvalidXLogRecPtr. > Micheal, it looks like you are working on a final version of this patch? I will wait to review it from my end, then. Regards, Nikhils -- 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