pgsql: Fix "missing continuation record" after standby promotion - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Fix "missing continuation record" after standby promotion
Date
Msg-id [email protected]
Whole thread Raw
List pgsql-committers
Fix "missing continuation record" after standby promotion

Invalidate abortedRecPtr and missingContrecPtr after a missing
continuation record is successfully skipped on a standby. This fixes a
PANIC caused when a recently promoted standby attempts to write an
OVERWRITE_RECORD with an LSN of the previously read aborted record.

Backpatch to 10 (all stable versions).

Author: Sami Imseih <[email protected]>
Reviewed-by: Kyotaro Horiguchi <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d92582abf918215d27659d45a4c9e78bda50aff

Modified Files
--------------
src/backend/access/transam/xlogrecovery.c       | 4 ++++
src/test/recovery/t/026_overwrite_contrecord.pl | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pgsql: Unbreak the build.
Next
From: Robert Haas
Date:
Subject: pgsql: pg_basebackup: Try to fix some failures on Windows.