diff options
author | Alvaro Herrera | 2021-11-26 14:14:27 +0000 |
---|---|---|
committer | Alvaro Herrera | 2021-11-26 14:14:27 +0000 |
commit | 44bd3ed332d6ad3207f38b3b6deb6083f0baddf5 (patch) | |
tree | 4dd1a3b3bf2a758bd219c6a50b5fa42f2b67aecb /src/backend | |
parent | 4597fd78d6dea2235cb948ea036c2d61057c415c (diff) |
Fix determination of broken LSN in OVERWRITTEN_CONTRECORD
In commit ff9f111bce24 I mixed up inconsistent definitions of the LSN of
the first record in a page, when the previous record ends exactly at the
page boundary. The correct LSN is adjusted to skip the WAL page header;
I failed to use that when setting XLogReaderState->overwrittenRecPtr,
so at WAL replay time VerifyOverwriteContrecord would refuse to let
replay continue past that record.
Backpatch to 10. 9.6 also contains this bug, but it's no longer being
maintained.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/transam/xlogreader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index f39f8044a9..3a7de02565 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -467,7 +467,7 @@ restart: */ if (pageHeader->xlp_info & XLP_FIRST_IS_OVERWRITE_CONTRECORD) { - state->overwrittenRecPtr = state->currRecPtr; + state->overwrittenRecPtr = RecPtr; ResetDecoder(state); RecPtr = targetPagePtr; goto restart; |