Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 956685f

Browse files
committed
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.
1 parent af246c3 commit 956685f

File tree

1 file changed

+2
-2
lines changed
  • src/backend/access/transam

1 file changed

+2
-2
lines changed

src/backend/access/transam/xlog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -6187,7 +6187,7 @@ CheckRequiredParameterValues(void)
61876187
* For archive recovery, the WAL must be generated with at least 'archive'
61886188
* wal_level.
61896189
*/
6190-
if (InArchiveRecovery && ControlFile->wal_level == WAL_LEVEL_MINIMAL)
6190+
if (ArchiveRecoveryRequested && ControlFile->wal_level == WAL_LEVEL_MINIMAL)
61916191
{
61926192
ereport(WARNING,
61936193
(errmsg("WAL was generated with wal_level=minimal, data may be missing"),
@@ -6198,7 +6198,7 @@ CheckRequiredParameterValues(void)
61986198
* For Hot Standby, the WAL must be generated with 'hot_standby' mode, and
61996199
* we must have at least as many backend slots as the primary.
62006200
*/
6201-
if (InArchiveRecovery && EnableHotStandby)
6201+
if (ArchiveRecoveryRequested && EnableHotStandby)
62026202
{
62036203
if (ControlFile->wal_level < WAL_LEVEL_HOT_STANDBY)
62046204
ereport(ERROR,

0 commit comments

Comments
 (0)