Re: Speedup twophase transactions
Nikhil Sontakke <nikhils@2ndquadrant.com>
From: Nikhil Sontakke <nikhils@2ndquadrant.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: 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-02-02T06:07:20Z
Lists: pgsql-hackers
Attachments
- twophase_recovery_shmem_020217.patch (application/octet-stream) patch
>> Yeah. Was thinking about this yesterday. How about adding entries in >> TwoPhaseState itself (which become valid later)? Only if it does not >> cause a lot of code churn. > > That's possible as well, yes. PFA a patch which does the above. It re-uses the TwoPhaseState gxact entries to track 2PC PREPARE/COMMIT in shared memory. The advantage being that CheckPointTwoPhase() becomes the only place where the fsync of 2PC files happens. A minor annoyance in the patch is the duplication of the code to add the 2nd while loop to go through these shared memory entries in PrescanPreparedTransactions, RecoverPreparedTransactions and StandbyRecoverPreparedTransactions. Other than this, I ran TAP tests and they succeed as needed. Regards, Nikhils -- Nikhil Sontakke http://www.2ndQuadrant.com/ PostgreSQL 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