@@ -5434,7 +5434,7 @@ CheckRequiredParameterValues(void)
5434
5434
* For archive recovery, the WAL must be generated with at least 'replica'
5435
5435
* wal_level.
5436
5436
*/
5437
- if (ArchiveRecoveryRequested && ControlFile -> wal_level == WAL_LEVEL_MINIMAL )
5437
+ if (ArchiveRecoveryRequested () && ControlFile -> wal_level == WAL_LEVEL_MINIMAL )
5438
5438
{
5439
5439
ereport (FATAL ,
5440
5440
(errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
@@ -5447,7 +5447,7 @@ CheckRequiredParameterValues(void)
5447
5447
* For Hot Standby, the WAL must be generated with 'replica' mode, and we
5448
5448
* must have at least as many backend slots as the primary.
5449
5449
*/
5450
- if (ArchiveRecoveryRequested && EnableHotStandby )
5450
+ if (ArchiveRecoveryRequested () && EnableHotStandby )
5451
5451
{
5452
5452
/* We ignore autovacuum_worker_slots when we make this test. */
5453
5453
RecoveryRequiresIntParameter ("max_connections" ,
@@ -5607,8 +5607,8 @@ StartupXLOG(void)
5607
5607
*
5608
5608
* InitWalRecovery analyzes the control file and the backup label file, if
5609
5609
* any. It updates the in-memory ControlFile buffer according to the
5610
- * starting checkpoint, and sets InRecovery and ArchiveRecoveryRequested.
5611
- * It also applies the tablespace map file, if any.
5610
+ * starting checkpoint, and sets SX_ARCHIVE_RECOVERY_REQUESTED and
5611
+ * InRecovery. It also applies the tablespace map file, if any.
5612
5612
*/
5613
5613
InitWalRecovery (ControlFile , & wasShutdown ,
5614
5614
& haveBackupLabel , & haveTblspcMap );
@@ -5740,7 +5740,7 @@ StartupXLOG(void)
5740
5740
{
5741
5741
/* Initialize state for RecoveryInProgress() */
5742
5742
SpinLockAcquire (& XLogCtl -> info_lck );
5743
- if (InArchiveRecovery )
5743
+ if (InArchiveRecovery () )
5744
5744
XLogCtl -> SharedRecoveryState = RECOVERY_STATE_ARCHIVE ;
5745
5745
else
5746
5746
XLogCtl -> SharedRecoveryState = RECOVERY_STATE_CRASH ;
@@ -5793,7 +5793,7 @@ StartupXLOG(void)
5793
5793
* startup process to think that there are still invalid page
5794
5794
* references when checking for data consistency.
5795
5795
*/
5796
- if (InArchiveRecovery )
5796
+ if (InArchiveRecovery () )
5797
5797
{
5798
5798
LocalMinRecoveryPoint = ControlFile -> minRecoveryPoint ;
5799
5799
LocalMinRecoveryPointTLI = ControlFile -> minRecoveryPointTLI ;
@@ -5827,7 +5827,7 @@ StartupXLOG(void)
5827
5827
* control file and we've established a recovery snapshot from a
5828
5828
* running-xacts WAL record.
5829
5829
*/
5830
- if (ArchiveRecoveryRequested && EnableHotStandby )
5830
+ if (ArchiveRecoveryRequested () && EnableHotStandby )
5831
5831
{
5832
5832
TransactionId * xids ;
5833
5833
int nxids ;
@@ -5940,7 +5940,7 @@ StartupXLOG(void)
5940
5940
* recover from an online backup but never called pg_backup_stop(), or
5941
5941
* you didn't archive all the WAL needed.
5942
5942
*/
5943
- if (ArchiveRecoveryRequested || ControlFile -> backupEndRequired )
5943
+ if (ArchiveRecoveryRequested () || ControlFile -> backupEndRequired )
5944
5944
{
5945
5945
if (!XLogRecPtrIsInvalid (ControlFile -> backupStartPoint ) || ControlFile -> backupEndRequired )
5946
5946
ereport (FATAL ,
@@ -5992,7 +5992,7 @@ StartupXLOG(void)
5992
5992
* In a normal crash recovery, we can just extend the timeline we were in.
5993
5993
*/
5994
5994
newTLI = endOfRecoveryInfo -> lastRecTLI ;
5995
- if (ArchiveRecoveryRequested )
5995
+ if (ArchiveRecoveryRequested () )
5996
5996
{
5997
5997
newTLI = findNewestTimeLine (recoveryTargetTLI ) + 1 ;
5998
5998
ereport (LOG ,
@@ -6185,7 +6185,7 @@ StartupXLOG(void)
6185
6185
XLogReportParameters ();
6186
6186
6187
6187
/* If this is archive recovery, perform post-recovery cleanup actions. */
6188
- if (ArchiveRecoveryRequested )
6188
+ if (ArchiveRecoveryRequested () )
6189
6189
CleanupAfterArchiveRecovery (EndOfLogTLI , EndOfLog , newTLI );
6190
6190
6191
6191
/*
@@ -6344,7 +6344,7 @@ PerformRecoveryXLogAction(void)
6344
6344
* of a full checkpoint. A checkpoint is requested later, after we're
6345
6345
* fully out of recovery mode and already accepting queries.
6346
6346
*/
6347
- if (ArchiveRecoveryRequested && IsUnderPostmaster &&
6347
+ if (ArchiveRecoveryRequested () && IsUnderPostmaster &&
6348
6348
PromoteIsTriggered ())
6349
6349
{
6350
6350
promoted = true;
@@ -8338,7 +8338,7 @@ xlog_redo(XLogReaderState *record)
8338
8338
* record, the backup was canceled and the end-of-backup record will
8339
8339
* never arrive.
8340
8340
*/
8341
- if (ArchiveRecoveryRequested &&
8341
+ if (ArchiveRecoveryRequested () &&
8342
8342
!XLogRecPtrIsInvalid (ControlFile -> backupStartPoint ) &&
8343
8343
XLogRecPtrIsInvalid (ControlFile -> backupEndPoint ))
8344
8344
ereport (PANIC ,
@@ -8579,7 +8579,7 @@ xlog_redo(XLogReaderState *record)
8579
8579
* local copies cannot be updated as long as crash recovery is
8580
8580
* happening and we expect all the WAL to be replayed.
8581
8581
*/
8582
- if (InArchiveRecovery )
8582
+ if (InArchiveRecovery () )
8583
8583
{
8584
8584
LocalMinRecoveryPoint = ControlFile -> minRecoveryPoint ;
8585
8585
LocalMinRecoveryPointTLI = ControlFile -> minRecoveryPointTLI ;
0 commit comments