Обсуждение: pgsql: Check that xmax didn't commit in freeze check.

Поиск
Список
Период
Сортировка

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

От
Peter Geoghegan
Дата:
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(-)