summaryrefslogtreecommitdiff
path: root/src/backend/access/transam
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2024-10-25 06:51:03 -0700
committerNoah Misch <noah@leadboat.com>2024-10-25 06:51:08 -0700
commit1e74e31f3c93f01c2ddb1e2b25db23fb0533244c (patch)
treea550dd00ba881daf3dd1e030a76afb5d6d3a11bb /src/backend/access/transam
parent0ea9d40a667960ad5cca5f537bb88d3bf6038379 (diff)
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
Diffstat (limited to 'src/backend/access/transam')
-rw-r--r--src/backend/access/transam/xloginsert.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index cd85d4bcc72..4d437caf382 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -269,8 +269,6 @@ XLogRegisterBlock(uint8 block_id, RelFileNode *rnode, ForkNumber forknum,
{
registered_buffer *regbuf;
- /* This is currently only used to WAL-log a full-page image of a page */
- Assert(flags & REGBUF_FORCE_IMAGE);
Assert(begininsert_called);
if (block_id >= max_registered_block_id)