diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-03-05 14:41:55 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-03-05 14:48:14 +0200 |
commit | 956685f82b6983ff17e6a39bd386b11f554715a8 (patch) | |
tree | a639125c4a6c204ff3b9fe8a35cb877263c82c71 /src/backend/access/transam/xlog.c | |
parent | af246c37c056e3b16be04e899e94e3a100f3918e (diff) | |
download | postgresql-956685f82b6983ff17e6a39bd386b11f554715a8.tar.gz postgresql-956685f82b6983ff17e6a39bd386b11f554715a8.zip |
Do wal_level and hot standby checks when doing crash-then-archive recovery.
CheckRequiredParameterValues() should perform the checks if archive recovery
was requested, even if we are going to perform crash recovery first.
Reported by Kyotaro HORIGUCHI. Backpatch to 9.2, like the crash-then-archive
recovery mode.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index e3d5e106b91..cdbe305f952 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6187,7 +6187,7 @@ CheckRequiredParameterValues(void) * For archive recovery, the WAL must be generated with at least 'archive' * wal_level. */ - if (InArchiveRecovery && ControlFile->wal_level == WAL_LEVEL_MINIMAL) + if (ArchiveRecoveryRequested && ControlFile->wal_level == WAL_LEVEL_MINIMAL) { ereport(WARNING, (errmsg("WAL was generated with wal_level=minimal, data may be missing"), @@ -6198,7 +6198,7 @@ CheckRequiredParameterValues(void) * For Hot Standby, the WAL must be generated with 'hot_standby' mode, and * we must have at least as many backend slots as the primary. */ - if (InArchiveRecovery && EnableHotStandby) + if (ArchiveRecoveryRequested && EnableHotStandby) { if (ControlFile->wal_level < WAL_LEVEL_HOT_STANDBY) ereport(ERROR, |