pgsql: WAL-log inplace update before revealing it to other sessions.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: WAL-log inplace update before revealing it to other sessions.
Date: 2024-10-25 13:51:48
Message-ID: E1t4KjF-002OMx-6f@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

WAL-log inplace update before revealing it to other sessions.

A buffer lock won't stop a reader having already checked tuple
visibility. If a vac_update_datfrozenid() and then a crash happened
during inplace update of a relfrozenxid value, datfrozenxid could
overtake relfrozenxid. That could lead to "could not access status of
transaction" errors. Back-patch to v12 (all supported versions). In
v14 and earlier, this also back-patches the assertion removal from
commit 7fcf2faf9c7dd473208fd6d5565f88d7f733782b.

Discussion: https://postgr.es/m/20240620012908.92.nmisch@google.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/431e05181e4172415decf618ada8e91d6df995b1

Modified Files
--------------
src/backend/access/heap/README.tuplock | 4 +--
src/backend/access/heap/heapam.c | 58 ++++++++++++++++++++++++++--------
2 files changed, 46 insertions(+), 16 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Melanie Plageman 2024-10-25 14:22:10 pgsql: Make table_scan_bitmap_next_block() async-friendly
Previous Message Daniel Gustafsson 2024-10-25 12:14:51 pgsql: doc: Fix typo in pg_restore_*_stats function documentation