mirror of
https://github.com/postgres/postgres.git
synced 2026-02-24 10:25:42 -05:00
Crash recovery on standby may encounter missing directories when
replaying create database WAL records. Prior to this patch, the standby
would fail to recover in such a case. However, the directories could be
legitimately missing. Consider a sequence of WAL records as follows:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the tablespace
directory, the standby crashes and has to replay the create database
record again, the crash recovery must be able to move on.
This patch adds a mechanism similar to invalid-page tracking, to keep a
tally of missing directories during crash recovery. If all the missing
directory references are matched with corresponding drop records at the
end of crash recovery, the standby can safely continue following the
primary.
Backpatch to 13, at least for now. The bug is older, but fixing it in
older branches requires more careful study of the interactions with
commit
|
||
|---|---|---|
| .. | ||
| ci | ||
| editors | ||
| ifaddrs | ||
| msvc | ||
| perlcheck | ||
| pginclude | ||
| pgindent | ||
| ccsym | ||
| check_bison_recursion.pl | ||
| codelines | ||
| copyright.pl | ||
| 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 | ||