@@ -5573,7 +5573,7 @@ CheckRequiredParameterValues(void)
5573
5573
* For archive recovery, the WAL must be generated with at least 'replica'
5574
5574
* wal_level.
5575
5575
*/
5576
- if (ArchiveRecoveryRequested && ControlFile -> wal_level == WAL_LEVEL_MINIMAL )
5576
+ if (ArchiveRecoveryRequested () && ControlFile -> wal_level == WAL_LEVEL_MINIMAL )
5577
5577
{
5578
5578
ereport (FATAL ,
5579
5579
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
@@ -5586,7 +5586,7 @@ CheckRequiredParameterValues(void)
5586
5586
* For Hot Standby, the WAL must be generated with 'replica' mode, and we
5587
5587
* must have at least as many backend slots as the primary.
5588
5588
*/
5589
- if (ArchiveRecoveryRequested && EnableHotStandby )
5589
+ if (ArchiveRecoveryRequested () && EnableHotStandby )
5590
5590
{
5591
5591
/* We ignore autovacuum_worker_slots when we make this test. */
5592
5592
RecoveryRequiresIntParameter ("max_connections" ,
@@ -5746,8 +5746,8 @@ StartupXLOG(void)
5746
5746
*
5747
5747
* InitWalRecovery analyzes the control file and the backup label file, if
5748
5748
* any. It updates the in-memory ControlFile buffer according to the
5749
- * starting checkpoint, and sets InRecovery and ArchiveRecoveryRequested.
5750
- * It also applies the tablespace map file, if any.
5749
+ * starting checkpoint, and sets SX_ARCHIVE_RECOVERY_REQUESTED and
5750
+ * InRecovery. It also applies the tablespace map file, if any.
5751
5751
*/
5752
5752
InitWalRecovery (ControlFile , & wasShutdown ,
5753
5753
& haveBackupLabel , & haveTblspcMap );
@@ -5879,7 +5879,7 @@ StartupXLOG(void)
5879
5879
{
5880
5880
/* Initialize state for RecoveryInProgress() */
5881
5881
SpinLockAcquire (& XLogCtl -> info_lck );
5882
- if (InArchiveRecovery )
5882
+ if (InArchiveRecovery () )
5883
5883
XLogCtl -> SharedRecoveryState = RECOVERY_STATE_ARCHIVE ;
5884
5884
else
5885
5885
XLogCtl -> SharedRecoveryState = RECOVERY_STATE_CRASH ;
@@ -5932,7 +5932,7 @@ StartupXLOG(void)
5932
5932
* startup process to think that there are still invalid page
5933
5933
* references when checking for data consistency.
5934
5934
*/
5935
- if (InArchiveRecovery )
5935
+ if (InArchiveRecovery () )
5936
5936
{
5937
5937
LocalMinRecoveryPoint = ControlFile -> minRecoveryPoint ;
5938
5938
LocalMinRecoveryPointTLI = ControlFile -> minRecoveryPointTLI ;
@@ -5966,7 +5966,7 @@ StartupXLOG(void)
5966
5966
* control file and we've established a recovery snapshot from a
5967
5967
* running-xacts WAL record.
5968
5968
*/
5969
- if (ArchiveRecoveryRequested && EnableHotStandby )
5969
+ if (ArchiveRecoveryRequested () && EnableHotStandby )
5970
5970
{
5971
5971
TransactionId * xids ;
5972
5972
int nxids ;
@@ -6079,7 +6079,7 @@ StartupXLOG(void)
6079
6079
* recover from an online backup but never called pg_backup_stop(), or
6080
6080
* you didn't archive all the WAL needed.
6081
6081
*/
6082
- if (ArchiveRecoveryRequested || ControlFile -> backupEndRequired )
6082
+ if (ArchiveRecoveryRequested () || ControlFile -> backupEndRequired )
6083
6083
{
6084
6084
if (!XLogRecPtrIsInvalid (ControlFile -> backupStartPoint ) || ControlFile -> backupEndRequired )
6085
6085
ereport (FATAL ,
@@ -6131,7 +6131,7 @@ StartupXLOG(void)
6131
6131
* In a normal crash recovery, we can just extend the timeline we were in.
6132
6132
*/
6133
6133
newTLI = endOfRecoveryInfo -> lastRecTLI ;
6134
- if (ArchiveRecoveryRequested )
6134
+ if (ArchiveRecoveryRequested () )
6135
6135
{
6136
6136
newTLI = findNewestTimeLine (recoveryTargetTLI ) + 1 ;
6137
6137
ereport (LOG ,
@@ -6327,7 +6327,7 @@ StartupXLOG(void)
6327
6327
XLogReportParameters ();
6328
6328
6329
6329
/* If this is archive recovery, perform post-recovery cleanup actions. */
6330
- if (ArchiveRecoveryRequested )
6330
+ if (ArchiveRecoveryRequested () )
6331
6331
CleanupAfterArchiveRecovery (EndOfLogTLI , EndOfLog , newTLI );
6332
6332
6333
6333
/*
@@ -6486,7 +6486,7 @@ PerformRecoveryXLogAction(void)
6486
6486
* of a full checkpoint. A checkpoint is requested later, after we're
6487
6487
* fully out of recovery mode and already accepting queries.
6488
6488
*/
6489
- if (ArchiveRecoveryRequested && IsUnderPostmaster &&
6489
+ if (ArchiveRecoveryRequested () && IsUnderPostmaster &&
6490
6490
PromoteIsTriggered ())
6491
6491
{
6492
6492
promoted = true;
@@ -8480,7 +8480,7 @@ xlog_redo(XLogReaderState *record)
8480
8480
* record, the backup was canceled and the end-of-backup record will
8481
8481
* never arrive.
8482
8482
*/
8483
- if (ArchiveRecoveryRequested &&
8483
+ if (ArchiveRecoveryRequested () &&
8484
8484
!XLogRecPtrIsInvalid (ControlFile -> backupStartPoint ) &&
8485
8485
XLogRecPtrIsInvalid (ControlFile -> backupEndPoint ))
8486
8486
ereport (PANIC ,
@@ -8721,7 +8721,7 @@ xlog_redo(XLogReaderState *record)
8721
8721
* local copies cannot be updated as long as crash recovery is
8722
8722
* happening and we expect all the WAL to be replayed.
8723
8723
*/
8724
- if (InArchiveRecovery )
8724
+ if (InArchiveRecovery () )
8725
8725
{
8726
8726
LocalMinRecoveryPoint = ControlFile -> minRecoveryPoint ;
8727
8727
LocalMinRecoveryPointTLI = ControlFile -> minRecoveryPointTLI ;
0 commit comments