mirror of
https://github.com/postgres/postgres.git
synced 2025-09-09 13:09:39 +03:00
Make postmaster restart archiver soon after it dies, even during recovery.
After the archiver dies, postmaster tries to start a new one immediately.
But previously this could happen only while server was running normally
even though archiving was enabled always (i.e., archive_mode was set to
always). So the archiver running during recovery could not restart soon
after it died. This is an oversight in commit ffd3774
.
This commit changes reaper(), postmaster's signal handler to cleanup
after a child process dies, so that it tries to a new archiver even during
recovery if necessary.
Patch by me. Review by Alvaro Herrera.
This commit is contained in:
@@ -126,8 +126,12 @@ typedef enum WalLevel
|
||||
} WalLevel;
|
||||
extern int wal_level;
|
||||
|
||||
/* Is WAL archiving enabled (always or only while server is running normally)? */
|
||||
#define XLogArchivingActive() \
|
||||
(XLogArchiveMode > ARCHIVE_MODE_OFF && wal_level >= WAL_LEVEL_ARCHIVE)
|
||||
/* Is WAL archiving enabled always (even during recovery)? */
|
||||
#define XLogArchivingAlways() \
|
||||
(XLogArchiveMode == ARCHIVE_MODE_ALWAYS && wal_level >= WAL_LEVEL_ARCHIVE)
|
||||
#define XLogArchiveCommandSet() (XLogArchiveCommand[0] != '\0')
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user