mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
This commit reverts8f67f994e8(down to v13) andc3de0f9eed(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,5a1dfde833being not enough. - In v13 and newer branches,8f67f994e8is a workaround for the real issue, which is that we should not attempt CLOG lookups without reaching consistency. This exists since728bd991c3, 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