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 <sims...@amazon.com>
Reviewed-by: Kyotaro Horiguchi <horikyota....@gmail.com>
Reviewed-by: Álvaro Herrera <alvhe...@alvh.no-ip.org>
Discussion: https://postgr.es/m/44d259de-7542-49c4-8a52-2ab01534d...@amazon.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/98eb3e06ce3a628adabeb90584c002a3c4bcec8e

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

Reply via email to