pgsql: Check that xmax didn't commit in freeze check.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Check that xmax didn't commit in freeze check.
Date: 2023-01-04 05:49:13
Message-ID: E1pCweH-001xRa-Hx@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)bowt(dot)ie>
Reported-By: Andres Freund <andres(at)anarazel(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2023-01-04 05:50:48 Re: pgsql: Delay commit status checks until freezing executes.
Previous Message Peter Geoghegan 2023-01-04 04:29:53 Re: pgsql: Delay commit status checks until freezing executes.