aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-03-05 14:41:55 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-03-05 14:45:55 +0200
commite7ec05562ed754fb60f75ea83efe103266a92015 (patch)
tree5df5c0170a18690fcaf6c041047e02738d74f64f /src/backend/access/transam/xlog.c
parent931dc26b0d2ba9b2d174119b7ff277b977d03619 (diff)
downloadpostgresql-e7ec05562ed754fb60f75ea83efe103266a92015.tar.gz
postgresql-e7ec05562ed754fb60f75ea83efe103266a92015.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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 9f34f1ec7cf..15e0c01b59d 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6195,7 +6195,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"),
@@ -6206,7 +6206,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,