]> git.ipfire.org Git - thirdparty/postgresql.git/commit
WAL-log inplace update before revealing it to other sessions.
authorNoah Misch <noah@leadboat.com>
Fri, 25 Oct 2024 13:51:03 +0000 (06:51 -0700)
committerNoah Misch <noah@leadboat.com>
Fri, 25 Oct 2024 13:51:07 +0000 (06:51 -0700)
commit431e05181e4172415decf618ada8e91d6df995b1
tree1705d5ee990118e8ad3f9018223c7f34252042ab
parent4eac5a1fa78edde0de53a89bd2b06e1fe5588913
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
src/backend/access/heap/README.tuplock
src/backend/access/heap/heapam.c