Re: [HACKERS] logical decoding of two-phase transactions - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Re: [HACKERS] logical decoding of two-phase transactions
Date
Msg-id 589241FB.8060509@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] logical decoding of two-phase transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 02/01/2017 10:32 PM, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> Also, including the GID in the WAL for each COMMIT/ABORT PREPARED
>> doesn't seem inordinately expensive to me.
> I'm confused ... isn't it there already?  If not, how do we handle
> reconstructing 2PC state from WAL at all?
>
>             regards, tom lane
>
>
Right now logical decoding ignores prepare and take in account only "commit prepared":
           /*            * Currently decoding ignores PREPARE TRANSACTION and will just            * decode the
transactionwhen the COMMIT PREPARED is sent or            * throw away the transaction's contents when a ROLLBACK
PREPARED           * is received. In the future we could add code to expose prepared            * transactions in the
changestreamallowing for a kind of            * distributed 2PC.            */
 

For some scenarios it works well, but if we really need prepared state at replica (as in case of multimaster), then it
isnot enough.
 

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)
Next
From: Konstantin Knizhnik
Date:
Subject: Re: [HACKERS] Deadlock in XLogInsert at AIX