mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
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 7fcf2faf9c
.
Discussion: https://postgr.es/m/20240620012908.92.nmisch@google.com
This commit is contained in:
@@ -203,6 +203,4 @@ Inplace updates create an exception to the rule that tuple data won't change
|
||||
under a reader holding a pin. A reader of a heap_fetch() result tuple may
|
||||
witness a torn read. Current inplace-updated fields are aligned and are no
|
||||
wider than four bytes, and current readers don't need consistency across
|
||||
fields. Hence, they get by with just fetching each field once. XXX such a
|
||||
caller may also read a value that has not reached WAL; see
|
||||
systable_inplace_update_finish().
|
||||
fields. Hence, they get by with just fetching each field once.
|
||||
|
Reference in New Issue
Block a user