Re: Speedup twophase transactions

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Nikhil Sontakke <nikhils(at)2ndquadrant(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 12:28:26
Message-ID: CAB7nPqR-bpR=fPsmm0TQzmk7AKOYSq2Zs1yVY-jccTRqHsaz2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 27, 2017 at 8:23 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 27 January 2017 at 11:01, Nikhil Sontakke <nikhils(at)2ndquadrant(dot)com> wrote:
>> 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.

I agree with Simon here. There is no point to fsync the 2PC files are
in case of an immediate crash after promotion replay will happen from
the last checkpoint, aka the one before the promotion has been
triggered. So there is no point to flush them at promotion, they would
be replayed anyway.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-01-27 12:33:52 Re: Allow interrupts on waiting standby
Previous Message Rushabh Lathia 2017-01-27 12:28:04 Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)