mirror of
https://github.com/postgres/postgres.git
synced 2026-02-23 01:40:33 -05:00
Physical replication always ships WAL segment files to replicas once
they are complete. This is a problem if one WAL record is split across
a segment boundary and the primary server crashes before writing down
the segment with the next portion of the WAL record: WAL writing after
crash recovery would happily resume at the point where the broken record
started, overwriting that record ... but any standby or backup may have
already received a copy of that segment, and they are not rewinding.
This causes standbys to stop following the primary after the latter
crashes:
LOG: invalid contrecord length 7262 at A8/D9FFFBC8
because the standby is still trying to read the continuation record
(contrecord) for the original long WAL record, but it is not there and
it will never be. A workaround is to stop the replica, delete the WAL
file, and restart it -- at which point a fresh copy is brought over from
the primary. But that's pretty labor intensive, and I bet many users
would just give up and re-clone the standby instead.
A fix for this problem was already attempted in commit
|
||
|---|---|---|
| .. | ||
| editors | ||
| findoidjoins | ||
| ifaddrs | ||
| make_diff | ||
| msvc | ||
| perlcheck | ||
| pginclude | ||
| pgindent | ||
| ccsym | ||
| check_bison_recursion.pl | ||
| codelines | ||
| copyright.pl | ||
| FAQ2txt | ||
| find_badmacros | ||
| find_static | ||
| find_typedef | ||
| fix-old-flex-code.pl | ||
| gen_keywordlist.pl | ||
| git-external-diff | ||
| git_changelog | ||
| make_ctags | ||
| make_etags | ||
| make_mkid | ||
| PerfectHash.pm | ||
| pgtest | ||
| RELEASE_CHANGES | ||
| testint128.c | ||
| valgrind.supp | ||
| version_stamp.pl | ||
| win32tzlist.pl | ||