From: | Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | "Andrey V(dot) Lepikhov" <a(dot)lepikhov(at)postgrespro(dot)ru>, tsunakawa(dot)takay(at)fujitsu(dot)com, movead(dot)li(at)highgo(dot)ca, 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, PostgreSQL-Dev <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Global snapshots |
Date: | 2020-09-10 14:22:27 |
Message-ID: | c9a5c774eb9b5fb98d9a07c1ef1490b7@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020-09-09 20:29, Fujii Masao wrote:
> On 2020/09/09 2:00, Alexey Kondratov wrote:
>>
>> According to the Sawada-san's v25 0002 the logic is pretty much the
>> same there:
>>
>> +2. Pre-Commit phase (1st phase of two-phase commit)
>>
>> +3. Commit locally
>> +Once we've prepared all of them, commit the transaction locally.
>>
>> +4. Post-Commit Phase (2nd phase of two-phase commit)
>>
>> Brief look at the code confirms this scheme. IIUC, AtEOXact_FdwXact /
>> FdwXactParticipantEndTransaction happens after
>> ProcArrayEndTransaction() in the CommitTransaction(). Thus, I don't
>> see many difference between these approach and CallXactCallbacks()
>> usage regarding this point.
>
> IIUC the commit logic in Sawada-san's patch looks like
>
> 1. PreCommit_FdwXact()
> PREPARE TRANSACTION command is issued
>
> 2. RecordTransactionCommit()
> 2-1. WAL-log the commit record
> 2-2. Update CLOG
> 2-3. Wait for sync rep
> 2-4. FdwXactWaitForResolution()
> Wait until COMMIT PREPARED commands are issued to the
> remote servers and completed.
>
> 3. ProcArrayEndTransaction()
> 4. AtEOXact_FdwXact(true)
>
> So ISTM that the timing of when COMMIT PREPARED is issued
> to the remote server is different between the patches.
> Am I missing something?
>
No, you are right, sorry. At a first glance I thought that
AtEOXact_FdwXact is responsible for COMMIT PREPARED as well, but it is
only calling FdwXactParticipantEndTransaction in the abort case.
Regards
--
Alexey Kondratov
Postgres Professional https://www.postgrespro.com
Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Steiner | 2020-09-10 14:30:54 | Re: BUG #15858: could not stat file - over 4GB |
Previous Message | Drouvot, Bertrand | 2020-09-10 14:06:17 | Re: Display individual query in pg_stat_activity |