pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Revert recent changes related to handling of 2PC files at recove
Date: Fri, 17 Jan 2025 04:28:18 +0000
Message-ID: <E1tYdxy-0021D4-Ew@gemulon.postgresql.org> (raw)

Revert recent changes related to handling of 2PC files at recovery

This commit reverts 8f67f994e8ea (down to v13) and c3de0f9eed38 (down to
v17), as these are proving to not be completely correct regarding two
aspects:
- In v17 and newer branches, c3de0f9eed38's check for epoch handling is
incorrect, and does not correctly handle frozen epochs.  A logic closer
to widen_snapshot_xid() should be used.  The 2PC code should try to
integrate deeper with FullTransactionIds, 5a1dfde8334b being not enough.
- In v13 and newer branches, 8f67f994e8ea is a workaround for the real
issue, which is that we should not attempt CLOG lookups without reaching
consistency.  This exists since 728bd991c3c4, and this is reachable with
ProcessTwoPhaseBuffer() called by restoreTwoPhaseData() at the beginning
of recovery.

Per discussion with Noah Misch.

Discussion: https://postgr.es/m/20250116010051.f3.nmisch@google.com
Backpatch-through: 13

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/42c900d31e57419359a2838861865622cf470489

Modified Files
--------------
src/backend/access/transam/twophase.c | 16 ++++++++--------
src/test/recovery/t/009_twophase.pl   | 23 -----------------------
2 files changed, 8 insertions(+), 31 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1tYdxy-0021D4-Ew@gemulon.postgresql.org>
Permalink:  ../E1tYdxy-0021D4-Ew@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tYdxy-0021D4-Ew@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Revert recent changes related to handling of 2PC files at recove
  In-Reply-To: <E1tYdxy-0021D4-Ew@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox