Re: [BUG] Panic due to incorrect missingContrecPtr after promotion
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: "Imseih (AWS), Sami" <simseih@amazon.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-05-26T23:53:03Z
Lists: pgsql-hackers
On Tue, Feb 22, 2022 at 07:20:55PM +0000, Imseih (AWS), Sami wrote: > The overwrite_contrecord was introduced in 13.5 with https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=ff9f111bce24. > > Attached is a patch and a TAP test to handle this condition. The > patch ensures that an overwrite_contrecord is only created if the > missingContrecPtr is ahead of the last wal record. The test you are introducing to force a complete segment to be filled is funky, and kind of nice actually while being cheap. This part particularly makes the test predictable: ++unlink $node->basedir . "/pgdata/pg_wal/$endfile" ++ or die "could not unlink " . $node->basedir . "/pgdata/pg_wal/$endfile: $!"; I really like that. > With the patch, running the same tap test succeeds and a PANIC is > not observed. This needs a very close lookup, I'll try to check all that except if somebody beats me to it. -- Michael
Commits
-
Prevent WAL corruption after a standby promotion.
- 0b3ff539dd34 10.23 landed
- 002fba80ebde 11.18 landed
- 3c0ef0832748 12.13 landed
- 3f2701cda590 13.9 landed
- 0e54a5e27494 14.6 landed
- eb29fa38895c 15.0 landed
- 6672d7913929 16.0 landed
-
Fix "missing continuation record" after standby promotion
- caaeb88ff7ae 14.3 landed
- c714ebd0e8c1 12.11 landed
- 9d92582abf91 15.0 landed
- 9ade3c09a5d1 10.21 landed
- 98eb3e06ce3a 13.7 landed
- 199cd7b59a16 11.16 landed