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

Commit a5363a6

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 2cd72ba commit a5363a6

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4815,7 +4815,7 @@ CheckRequiredParameterValues(void)
48154815
* For archive recovery, the WAL must be generated with at least 'archive'
48164816
* wal_level.
48174817
*/
4818-
if (InArchiveRecovery && ControlFile->wal_level == WAL_LEVEL_MINIMAL)
4818+
if (ArchiveRecoveryRequested && ControlFile->wal_level == WAL_LEVEL_MINIMAL)
48194819
{
48204820
ereport(WARNING,
48214821
(errmsg("WAL was generated with wal_level=minimal, data may be missing"),
@@ -4826,7 +4826,7 @@ CheckRequiredParameterValues(void)
48264826
* For Hot Standby, the WAL must be generated with 'hot_standby' mode, and
48274827
* we must have at least as many backend slots as the primary.
48284828
*/
4829-
if (InArchiveRecovery && EnableHotStandby)
4829+
if (ArchiveRecoveryRequested && EnableHotStandby)
48304830
{
48314831
if (ControlFile->wal_level < WAL_LEVEL_HOT_STANDBY)
48324832
ereport(ERROR,

0 commit comments

Comments
 (0)