Re: Speedup twophase transactions

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Nikhil Sontakke <nikhils(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Speedup twophase transactions
Date: 2017-01-27 11:23:31
Message-ID: CANP8+jLZLdp9Q4VJ2-n0xgQR=fB01+McjypMFxN3BnAb1Oes5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27 January 2017 at 11:01, Nikhil Sontakke <nikhils(at)2ndquadrant(dot)com> wrote:
> On 27 January 2017 at 15:37, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> On 27 January 2017 at 09:59, Nikhil Sontakke <nikhils(at)2ndquadrant(dot)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 xact_redo code will add prepared transactions to the
> KnownPreparedList in memory. Earlier it used to create the on-disk 2PC
> file.
>
> At standby promote, the surviving (yet uncommitted) prepared
> transactions from KnownPreparedList need to be persisted, right?

I don't see why, so please explain or show the error that can be
caused if we don't.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-01-27 11:31:27 Re: BUG: pg_stat_statements query normalization issues with combined queries
Previous Message Ashutosh Bapat 2017-01-27 11:04:06 Re: Push down more full joins in postgres_fdw