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

From Stas Kelvich
Subject Re: [HACKERS] logical decoding of two-phase transactions
Date
Msg-id 3477E635-F590-4432-BD20-C59142B65CD3@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] logical decoding of two-phase transactions  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: [HACKERS] logical decoding of two-phase transactions  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
> On 26 Jan 2017, at 12:51, Craig Ringer <craig@2ndquadrant.com> wrote:
>
> * Tracking xid/gid map in memory also doesn’t help much — if server reboots between prepare
> and commit we’ll lose that mapping.
>
> Er what? That's why I suggested using the prepared xacts shmem state. It's persistent as you know from your work on
preparedtransaction files. It has all the required info. 

Imagine following scenario:

1. PREPARE happend
2. PREPARE decoded and sent where it should be sent
3. We got all responses from participating nodes and issuing COMMIT/ABORT
4. COMMIT/ABORT decoded and sent

After step 3 there is no more memory state associated with that prepared tx, so if will fail
between 3 and 4 then we can’t know GID unless we wrote it commit record (or table).

--
Stas Kelvich
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company





pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [HACKERS] multivariate statistics (v19)
Next
From: David Rowley
Date:
Subject: Re: [HACKERS] Performance improvement for joins where outer side is unique