Re: Speedup twophase transactions

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Stas Kelvich <s.kelvich@postgrespro.ru>, Alvaro Herrera <alvherre@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-01-11T22:24:45Z
Lists: pgsql-hackers
Hi,

On January 11, 2016 10:46:01 PM GMT+01:00, Simon Riggs <simon@2ndQuadrant.com> wrote:
>On 11 January 2016 at 20:10, Andres Freund <andres@anarazel.de> wrote:
>
>> On January 11, 2016 8:57:58 PM GMT+01:00, Simon Riggs
>> <simon@2ndQuadrant.com> wrote:
>> >On 11 January 2016 at 18:43, Simon Riggs <simon@2ndquadrant.com>
>wrote:
>>
>> >It's clear there are various additional tuning opportunities, but
>the
>> >objective of the current patch to improve performance is very, very
>> >clearly
>> >met, so I'm aiming to commit *this* patch soon.
>>
>> Again, the WAL read routine used doesn't deal with timeline changes.
>
>
>Not relevant: The direct WAL read routine is never used during replay,
>so
>your comment is not relevant since we don't change timelines on the
>master.

Hm, OK.   But, isn't this actually a bad sign? Currently recovery of 2pc often already is a bigger bottleneck than the workload on the master, because replay has to execute the fsyncs implied by statefile  re-creation serially, whereas on the master they'll usually be executed in parallel. So, if I understand correctly this patch would widen that gap?

Anyway, as evidenced here, review on a phone isn't efficient, and that's all i have access to right now. Please wait till at least tomorrow evening, so I can have a meaningful look.

Andres

--- 
Please excuse brevity and formatting - I am writing this on my mobile phone.


Commits

  1. Speedup 2PC recovery by skipping two phase state files in normal path

  2. Add tests for two-phase commit

  3. Improve grammar of message about two-phase state files.

  4. Speedup 2PC by skipping two phase state files in normal path