@@ -273,7 +273,7 @@ static bool restoredFromArchive = false;
273
273
274
274
/* Buffers dedicated to consistency checks of size BLCKSZ */
275
275
static char * replay_image_masked = NULL ;
276
- static char * master_image_masked = NULL ;
276
+ static char * primary_image_masked = NULL ;
277
277
278
278
/* options formerly taken from recovery.conf for archive recovery */
279
279
char * recoveryRestoreCommand = NULL ;
@@ -784,7 +784,7 @@ typedef enum
784
784
XLOG_FROM_ANY = 0 , /* request to read WAL from any source */
785
785
XLOG_FROM_ARCHIVE , /* restored using restore_command */
786
786
XLOG_FROM_PG_WAL , /* existing file in pg_wal */
787
- XLOG_FROM_STREAM /* streamed from master */
787
+ XLOG_FROM_STREAM /* streamed from primary */
788
788
} XLogSource ;
789
789
790
790
/* human-readable names for XLogSources, for debugging output */
@@ -1478,21 +1478,21 @@ checkXLogConsistency(XLogReaderState *record)
1478
1478
* page here, a local buffer is fine to hold its contents and a mask
1479
1479
* can be directly applied on it.
1480
1480
*/
1481
- if (!RestoreBlockImage (record , block_id , master_image_masked ))
1481
+ if (!RestoreBlockImage (record , block_id , primary_image_masked ))
1482
1482
elog (ERROR , "failed to restore block image" );
1483
1483
1484
1484
/*
1485
- * If masking function is defined, mask both the master and replay
1485
+ * If masking function is defined, mask both the primary and replay
1486
1486
* images
1487
1487
*/
1488
1488
if (RmgrTable [rmid ].rm_mask != NULL )
1489
1489
{
1490
1490
RmgrTable [rmid ].rm_mask (replay_image_masked , blkno );
1491
- RmgrTable [rmid ].rm_mask (master_image_masked , blkno );
1491
+ RmgrTable [rmid ].rm_mask (primary_image_masked , blkno );
1492
1492
}
1493
1493
1494
- /* Time to compare the master and replay images. */
1495
- if (memcmp (replay_image_masked , master_image_masked , BLCKSZ ) != 0 )
1494
+ /* Time to compare the primary and replay images. */
1495
+ if (memcmp (replay_image_masked , primary_image_masked , BLCKSZ ) != 0 )
1496
1496
{
1497
1497
elog (FATAL ,
1498
1498
"inconsistent page found, rel %u/%u/%u, forknum %u, blkno %u" ,
@@ -2301,7 +2301,7 @@ CalculateCheckpointSegments(void)
2301
2301
* a) we keep WAL for only one checkpoint cycle (prior to PG11 we kept
2302
2302
* WAL for two checkpoint cycles to allow us to recover from the
2303
2303
* secondary checkpoint if the first checkpoint failed, though we
2304
- * only did this on the master anyway, not on standby. Keeping just
2304
+ * only did this on the primary anyway, not on standby. Keeping just
2305
2305
* one checkpoint simplifies processing and reduces disk space in
2306
2306
* many smaller databases.)
2307
2307
* b) during checkpoint, we consume checkpoint_completion_target *
@@ -3770,7 +3770,7 @@ XLogFileReadAnyTLI(XLogSegNo segno, int emode, XLogSource source)
3770
3770
* however, unless we actually find a valid segment. That way if there is
3771
3771
* neither a timeline history file nor a WAL segment in the archive, and
3772
3772
* streaming replication is set up, we'll read the timeline history file
3773
- * streamed from the master when we start streaming, instead of recovering
3773
+ * streamed from the primary when we start streaming, instead of recovering
3774
3774
* with a dummy history generated here.
3775
3775
*/
3776
3776
if (expectedTLEs )
@@ -6057,7 +6057,7 @@ SetRecoveryPause(bool recoveryPause)
6057
6057
6058
6058
/*
6059
6059
* When recovery_min_apply_delay is set, we wait long enough to make sure
6060
- * certain record types are applied at least that interval behind the master .
6060
+ * certain record types are applied at least that interval behind the primary .
6061
6061
*
6062
6062
* Returns true if we waited.
6063
6063
*
@@ -6239,7 +6239,7 @@ do { \
6239
6239
if ((currValue) < (minValue)) \
6240
6240
ereport(ERROR, \
6241
6241
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), \
6242
- errmsg("hot standby is not possible because %s = %d is a lower setting than on the master server (its value was %d)", \
6242
+ errmsg("hot standby is not possible because %s = %d is a lower setting than on the primary server (its value was %d)", \
6243
6243
param_name, \
6244
6244
currValue, \
6245
6245
minValue))); \
@@ -6275,8 +6275,8 @@ CheckRequiredParameterValues(void)
6275
6275
{
6276
6276
if (ControlFile -> wal_level < WAL_LEVEL_REPLICA )
6277
6277
ereport (ERROR ,
6278
- (errmsg ("hot standby is not possible because wal_level was not set to \"replica\" or higher on the master server" ),
6279
- errhint ("Either set wal_level to \"replica\" on the master , or turn off hot_standby here." )));
6278
+ (errmsg ("hot standby is not possible because wal_level was not set to \"replica\" or higher on the primary server" ),
6279
+ errhint ("Either set wal_level to \"replica\" on the primary , or turn off hot_standby here." )));
6280
6280
6281
6281
/* We ignore autovacuum_max_workers when we make this test. */
6282
6282
RecoveryRequiresIntParameter ("max_connections" ,
@@ -6502,7 +6502,7 @@ StartupXLOG(void)
6502
6502
* alignment, whereas palloc() will provide MAXALIGN'd storage.
6503
6503
*/
6504
6504
replay_image_masked = (char * ) palloc (BLCKSZ );
6505
- master_image_masked = (char * ) palloc (BLCKSZ );
6505
+ primary_image_masked = (char * ) palloc (BLCKSZ );
6506
6506
6507
6507
if (read_backup_label (& checkPointLoc , & backupEndRequired ,
6508
6508
& backupFromStandby ))
@@ -6631,7 +6631,7 @@ StartupXLOG(void)
6631
6631
* know how far we need to replay the WAL before we reach consistency.
6632
6632
* This can happen for example if a base backup is taken from a
6633
6633
* running server using an atomic filesystem snapshot, without calling
6634
- * pg_start/stop_backup. Or if you just kill a running master server
6634
+ * pg_start/stop_backup. Or if you just kill a running primary server
6635
6635
* and put it into archive recovery by creating a recovery signal
6636
6636
* file.
6637
6637
*
@@ -6829,7 +6829,7 @@ StartupXLOG(void)
6829
6829
* ourselves - the history file of the recovery target timeline covers all
6830
6830
* the previous timelines in the history too - a cascading standby server
6831
6831
* might be interested in them. Or, if you archive the WAL from this
6832
- * server to a different archive than the master , it'd be good for all the
6832
+ * server to a different archive than the primary , it'd be good for all the
6833
6833
* history files to get archived there after failover, so that you can use
6834
6834
* one of the old timelines as a PITR target. Timeline history files are
6835
6835
* small, so it's better to copy them unnecessarily than not copy them and
@@ -7065,7 +7065,7 @@ StartupXLOG(void)
7065
7065
7066
7066
/*
7067
7067
* If we're beginning at a shutdown checkpoint, we know that
7068
- * nothing was running on the master at this point. So fake-up an
7068
+ * nothing was running on the primary at this point. So fake-up an
7069
7069
* empty running-xacts record and use that here and now. Recover
7070
7070
* additional standby state for prepared transactions.
7071
7071
*/
@@ -7233,7 +7233,7 @@ StartupXLOG(void)
7233
7233
}
7234
7234
7235
7235
/*
7236
- * If we've been asked to lag the master , wait on latch until
7236
+ * If we've been asked to lag the primary , wait on latch until
7237
7237
* enough time has passed.
7238
7238
*/
7239
7239
if (recoveryApplyDelay (xlogreader ))
@@ -7348,7 +7348,7 @@ StartupXLOG(void)
7348
7348
/*
7349
7349
* If rm_redo called XLogRequestWalReceiverReply, then we wake
7350
7350
* up the receiver so that it notices the updated
7351
- * lastReplayedEndRecPtr and sends a reply to the master .
7351
+ * lastReplayedEndRecPtr and sends a reply to the primary .
7352
7352
*/
7353
7353
if (doRequestWalReceiverReply )
7354
7354
{
@@ -9949,7 +9949,7 @@ xlog_redo(XLogReaderState *record)
9949
9949
9950
9950
/*
9951
9951
* If we see a shutdown checkpoint, we know that nothing was running
9952
- * on the master at this point. So fake-up an empty running-xacts
9952
+ * on the primary at this point. So fake-up an empty running-xacts
9953
9953
* record and use that here and now. Recover additional standby state
9954
9954
* for prepared transactions.
9955
9955
*/
@@ -10663,7 +10663,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
10663
10663
"since last restartpoint" ),
10664
10664
errhint ("This means that the backup being taken on the standby "
10665
10665
"is corrupt and should not be used. "
10666
- "Enable full_page_writes and run CHECKPOINT on the master , "
10666
+ "Enable full_page_writes and run CHECKPOINT on the primary , "
10667
10667
"and then try an online backup again." )));
10668
10668
10669
10669
/*
@@ -10811,7 +10811,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
10811
10811
appendStringInfo (labelfile , "BACKUP METHOD: %s\n" ,
10812
10812
exclusive ? "pg_start_backup" : "streamed" );
10813
10813
appendStringInfo (labelfile , "BACKUP FROM: %s\n" ,
10814
- backup_started_in_recovery ? "standby" : "master " );
10814
+ backup_started_in_recovery ? "standby" : "primary " );
10815
10815
appendStringInfo (labelfile , "START TIME: %s\n" , strfbuf );
10816
10816
appendStringInfo (labelfile , "LABEL: %s\n" , backupidstr );
10817
10817
appendStringInfo (labelfile , "START TIMELINE: %u\n" , starttli );
@@ -11246,7 +11246,7 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p)
11246
11246
"during online backup" ),
11247
11247
errhint ("This means that the backup being taken on the standby "
11248
11248
"is corrupt and should not be used. "
11249
- "Enable full_page_writes and run CHECKPOINT on the master , "
11249
+ "Enable full_page_writes and run CHECKPOINT on the primary , "
11250
11250
"and then try an online backup again." )));
11251
11251
11252
11252
@@ -11928,7 +11928,7 @@ XLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr, int reqLen,
11928
11928
Assert (readFile != -1 );
11929
11929
11930
11930
/*
11931
- * If the current segment is being streamed from master , calculate how
11931
+ * If the current segment is being streamed from the primary , calculate how
11932
11932
* much of the current page we have received already. We know the
11933
11933
* requested record has been received, but this is for the benefit of
11934
11934
* future calls, to allow quick exit at the top of this function.
@@ -11989,8 +11989,8 @@ XLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr, int reqLen,
11989
11989
* example, imagine a scenario where a streaming replica is started up,
11990
11990
* and replay reaches a record that's split across two WAL segments. The
11991
11991
* first page is only available locally, in pg_wal, because it's already
11992
- * been recycled in the master . The second page, however, is not present
11993
- * in pg_wal, and we should stream it from the master . There is a recycled
11992
+ * been recycled on the primary . The second page, however, is not present
11993
+ * in pg_wal, and we should stream it from the primary . There is a recycled
11994
11994
* WAL segment present in pg_wal, with garbage contents, however. We would
11995
11995
* read the first page from the local WAL segment, but when reading the
11996
11996
* second page, we would read the bogus, recycled, WAL segment. If we
@@ -12150,7 +12150,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
12150
12150
* Failure while streaming. Most likely, we got here
12151
12151
* because streaming replication was terminated, or
12152
12152
* promotion was triggered. But we also get here if we
12153
- * find an invalid record in the WAL streamed from master ,
12153
+ * find an invalid record in the WAL streamed from the primary ,
12154
12154
* in which case something is seriously wrong. There's
12155
12155
* little chance that the problem will just go away, but
12156
12156
* PANIC is not good for availability either, especially
@@ -12511,7 +12511,7 @@ StartupRequestWalReceiverRestart(void)
12511
12511
* we're retrying the exact same record that we've tried previously, only
12512
12512
* complain the first time to keep the noise down. However, we only do when
12513
12513
* reading from pg_wal, because we don't expect any invalid records in archive
12514
- * or in records streamed from master . Files in the archive should be complete,
12514
+ * or in records streamed from the primary . Files in the archive should be complete,
12515
12515
* and we should never hit the end of WAL because we stop and wait for more WAL
12516
12516
* to arrive before replaying it.
12517
12517
*
0 commit comments