pgsql: Check that xmax didn't commit in freeze check. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Check that xmax didn't commit in freeze check.
Date
Msg-id E1pCweH-001xRa-Hx@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Check that xmax didn't commit in freeze check.

We cannot rely on TransactionIdDidAbort here, since in general it may
report transactions that were in-progress at the time of an earlier hard
crash as not aborted, effectively behaving as if they were still in
progress even after crash recovery completes.  Go back to defensively
verifying that xmax didn't commit instead.

Oversight in commit 79d4bf4e.

Author: Peter Geoghegan <pg@bowt.ie>
Reported-By: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/20230104035636.hy5djyr2as4gbc4q@awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/eb5ad4ff05fd382ac98cab60b82f7fd6ce4cfeb8

Modified Files
--------------
src/backend/access/heap/heapam.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pgsql: Update obsolete multixact.c comments.
Next
From: David Rowley
Date:
Subject: pgsql: Fix some compiler warnings in aset.c and generation.c