Check that xmax didn't commit in freeze check.
authorPeter Geoghegan <pg@bowt.ie>
Wed, 4 Jan 2023 05:48:27 +0000 (21:48 -0800)
committerPeter Geoghegan <pg@bowt.ie>
Wed, 4 Jan 2023 05:48:27 +0000 (21:48 -0800)
commiteb5ad4ff05fd382ac98cab60b82f7fd6ce4cfeb8
tree97908371c20014c70a81f7014cc4185461324c36
parent5212d447fa53518458cbe609092b347803a667c5
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
src/backend/access/heap/heapam.c