summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xloginsert.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2022-04-14 11:10:18 -0400
committerRobert Haas <rhaas@postgresql.org>2022-04-14 11:10:18 -0400
commit48b398943b78a42c61771a1210c70ffa0b017164 (patch)
tree2c7d44311a1768299636e74bbd84ec6c1ac0ceff /src/backend/access/transam/xloginsert.c
parent12d32b7bc15183be063516732d7458c58e2d2156 (diff)
Rethink the delay-checkpoint-end mechanism in the back-branches.
The back-patch of commit bbace5697df12398e87ffd9879171c39d27f5b33 had the unfortunate effect of changing the layout of PGPROC in the back-branches, which could break extensions. This happened because it changed the delayChkpt from type bool to type int. So, change it back, and add a new bool delayChkptEnd field instead. The new field should fall within what used to be padding space within the struct, and so hopefully won't cause any extensions to break. Per report from Markus Wanner and discussion with Tom Lane and others. Patch originally by me, somewhat revised by Markus Wanner per a suggestion from Michael Paquier. A very similar patch was developed by Kyotaro Horiguchi, but I failed to see the email in which that was posted before writing one of my own. Discussion: http://postgr.es/m/CA+Tgmoao-kUD9c5nG5sub3F7tbo39+cdr8jKaOVEs_1aBWcJ3Q@mail.gmail.com Discussion: http://postgr.es/m/20220406.164521.17171257901083417.horikyota.ntt@gmail.com
Diffstat (limited to 'src/backend/access/transam/xloginsert.c')
-rw-r--r--src/backend/access/transam/xloginsert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index 6ff19814d49..579d8de7759 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -899,7 +899,7 @@ XLogSaveBufferForHint(Buffer buffer, bool buffer_std)
/*
* Ensure no checkpoint can change our view of RedoRecPtr.
*/
- Assert((MyPgXact->delayChkpt & DELAY_CHKPT_START) != 0);
+ Assert(MyPgXact->delayChkpt);
/*
* Update RedoRecPtr so that we can make the right decision