diff options
author | Robert Haas <rhaas@postgresql.org> | 2022-04-14 11:10:13 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2022-04-14 11:10:13 -0400 |
commit | 68e605b9ef37e9b3e96b97f71857efabd95d5321 (patch) | |
tree | f03f0818ec79ac275e1a2ec62766b60f0275bc6c /src/backend/access/transam/xloginsert.c | |
parent | 5378d55cb2f38eed4a7423cd3aa16d9de80b5313 (diff) | |
download | postgresql-68e605b9ef37e9b3e96b97f71857efabd95d5321.tar.gz postgresql-68e605b9ef37e9b3e96b97f71857efabd95d5321.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c index b51b0edd67c..24a6f3148b1 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 |