@@ -911,7 +911,7 @@ static void checkTimeLineSwitch(XLogRecPtr lsn, TimeLineID newTLI,
911911 TimeLineID prevTLI , TimeLineID replayTLI );
912912static void VerifyOverwriteContrecord (xl_overwrite_contrecord * xlrec ,
913913 XLogReaderState * state );
914- static int LocalSetXLogInsertAllowed (void );
914+ static int LocalSetXLogInsertAllowed (void );
915915static void CreateEndOfRecoveryRecord (void );
916916static XLogRecPtr CreateOverwriteContrecordRecord (XLogRecPtr aborted_lsn );
917917static void CheckPointGuts (XLogRecPtr checkPointRedo , int flags );
@@ -5814,38 +5814,38 @@ CleanupAfterArchiveRecovery(TimeLineID EndOfLogTLI, XLogRecPtr EndOfLog,
58145814 * We switched to a new timeline. Clean up segments on the old timeline.
58155815 *
58165816 * If there are any higher-numbered segments on the old timeline, remove
5817- * them. They might contain valid WAL, but they might also be pre-allocated
5818- * files containing garbage. In any case, they are not part of the new
5819- * timeline's history so we don't need them.
5817+ * them. They might contain valid WAL, but they might also be
5818+ * pre-allocated files containing garbage. In any case, they are not part
5819+ * of the new timeline's history so we don't need them.
58205820 */
58215821 RemoveNonParentXlogFiles (EndOfLog , newTLI );
58225822
58235823 /*
58245824 * If the switch happened in the middle of a segment, what to do with the
58255825 * last, partial segment on the old timeline? If we don't archive it, and
5826- * the server that created the WAL never archives it either (e.g. because it
5827- * was hit by a meteor), it will never make it to the archive. That's OK
5828- * from our point of view, because the new segment that we created with the
5829- * new TLI contains all the WAL from the old timeline up to the switch
5826+ * the server that created the WAL never archives it either (e.g. because
5827+ * it was hit by a meteor), it will never make it to the archive. That's
5828+ * OK from our point of view, because the new segment that we created with
5829+ * the new TLI contains all the WAL from the old timeline up to the switch
58305830 * point. But if you later try to do PITR to the "missing" WAL on the old
5831- * timeline, recovery won't find it in the archive. It's physically present
5832- * in the new file with new TLI, but recovery won't look there when it's
5833- * recovering to the older timeline. On the other hand, if we archive the
5834- * partial segment, and the original server on that timeline is still
5835- * running and archives the completed version of the same segment later, it
5836- * will fail. (We used to do that in 9.4 and below, and it caused such
5837- * problems).
5831+ * timeline, recovery won't find it in the archive. It's physically
5832+ * present in the new file with new TLI, but recovery won't look there
5833+ * when it's recovering to the older timeline. On the other hand, if we
5834+ * archive the partial segment, and the original server on that timeline
5835+ * is still running and archives the completed version of the same segment
5836+ * later, it will fail. (We used to do that in 9.4 and below, and it
5837+ * caused such problems).
58385838 *
5839- * As a compromise, we rename the last segment with the .partial suffix, and
5840- * archive it. Archive recovery will never try to read .partial segments, so
5841- * they will normally go unused. But in the odd PITR case, the administrator
5842- * can copy them manually to the pg_wal directory (removing the suffix).
5843- * They can be useful in debugging, too.
5839+ * As a compromise, we rename the last segment with the .partial suffix,
5840+ * and archive it. Archive recovery will never try to read .partial
5841+ * segments, so they will normally go unused. But in the odd PITR case,
5842+ * the administrator can copy them manually to the pg_wal directory
5843+ * (removing the suffix). They can be useful in debugging, too.
58445844 *
58455845 * If a .done or .ready file already exists for the old timeline, however,
5846- * we had already determined that the segment is complete, so we can let it
5847- * be archived normally. (In particular, if it was restored from the archive
5848- * to begin with, it's expected to have a .done file).
5846+ * we had already determined that the segment is complete, so we can let
5847+ * it be archived normally. (In particular, if it was restored from the
5848+ * archive to begin with, it's expected to have a .done file).
58495849 */
58505850 if (XLogSegmentOffset (EndOfLog , wal_segment_size ) != 0 &&
58515851 XLogArchivingActive ())
@@ -7657,10 +7657,10 @@ StartupXLOG(void)
76577657 * Before replaying this record, check if this record causes
76587658 * the current timeline to change. The record is already
76597659 * considered to be part of the new timeline, so we update
7660- * replayTLI before replaying it. That's important so
7661- * that replayEndTLI, which is recorded as the minimum
7662- * recovery point's TLI if recovery stops after this record,
7663- * is set correctly.
7660+ * replayTLI before replaying it. That's important so that
7661+ * replayEndTLI, which is recorded as the minimum recovery
7662+ * point's TLI if recovery stops after this record, is set
7663+ * correctly.
76647664 */
76657665 if (record -> xl_rmid == RM_XLOG_ID )
76667666 {
@@ -8166,10 +8166,10 @@ StartupXLOG(void)
81668166 * Emit checkpoint or end-of-recovery record in XLOG, if required.
81678167 *
81688168 * XLogCtl->lastReplayedEndRecPtr will be a valid LSN if and only if we
8169- * entered recovery. Even if we ultimately replayed no WAL records, it will
8170- * have been initialized based on where replay was due to start. We don't
8171- * need a lock to access this, since this can't change any more by the time
8172- * we reach this code.
8169+ * entered recovery. Even if we ultimately replayed no WAL records, it
8170+ * will have been initialized based on where replay was due to start. We
8171+ * don't need a lock to access this, since this can't change any more by
8172+ * the time we reach this code.
81738173 */
81748174 if (!XLogRecPtrIsInvalid (XLogCtl -> lastReplayedEndRecPtr ))
81758175 promoted = PerformRecoveryXLogAction ();
@@ -8357,15 +8357,15 @@ PerformRecoveryXLogAction(void)
83578357 /*
83588358 * Perform a checkpoint to update all our recovery activity to disk.
83598359 *
8360- * Note that we write a shutdown checkpoint rather than an on-line one. This
8361- * is not particularly critical, but since we may be assigning a new TLI,
8362- * using a shutdown checkpoint allows us to have the rule that TLI only
8363- * changes in shutdown checkpoints, which allows some extra error checking
8364- * in xlog_redo.
8360+ * Note that we write a shutdown checkpoint rather than an on-line one.
8361+ * This is not particularly critical, but since we may be assigning a new
8362+ * TLI, using a shutdown checkpoint allows us to have the rule that TLI
8363+ * only changes in shutdown checkpoints, which allows some extra error
8364+ * checking in xlog_redo.
83658365 *
8366- * In promotion, only create a lightweight end-of-recovery record instead of
8367- * a full checkpoint. A checkpoint is requested later, after we're fully out
8368- * of recovery mode and already accepting queries.
8366+ * In promotion, only create a lightweight end-of-recovery record instead
8367+ * of a full checkpoint. A checkpoint is requested later, after we're
8368+ * fully out of recovery mode and already accepting queries.
83698369 */
83708370 if (ArchiveRecoveryRequested && IsUnderPostmaster &&
83718371 LocalPromoteIsTriggered )
@@ -8375,11 +8375,11 @@ PerformRecoveryXLogAction(void)
83758375 /*
83768376 * Insert a special WAL record to mark the end of recovery, since we
83778377 * aren't doing a checkpoint. That means that the checkpointer process
8378- * may likely be in the middle of a time-smoothed restartpoint and could
8379- * continue to be for minutes after this. That sounds strange, but the
8380- * effect is roughly the same and it would be stranger to try to come
8381- * out of the restartpoint and then checkpoint. We request a checkpoint
8382- * later anyway, just for safety.
8378+ * may likely be in the middle of a time-smoothed restartpoint and
8379+ * could continue to be for minutes after this. That sounds strange,
8380+ * but the effect is roughly the same and it would be stranger to try
8381+ * to come out of the restartpoint and then checkpoint. We request a
8382+ * checkpoint later anyway, just for safety.
83838383 */
83848384 CreateEndOfRecoveryRecord ();
83858385 }
@@ -8531,7 +8531,7 @@ XLogInsertAllowed(void)
85318531static int
85328532LocalSetXLogInsertAllowed (void )
85338533{
8534- int oldXLogAllowed = LocalXLogInsertAllowed ;
8534+ int oldXLogAllowed = LocalXLogInsertAllowed ;
85358535
85368536 LocalXLogInsertAllowed = 1 ;
85378537
@@ -8718,8 +8718,8 @@ GetFlushRecPtr(TimeLineID *insertTLI)
87188718 SpinLockRelease (& XLogCtl -> info_lck );
87198719
87208720 /*
8721- * If we're writing and flushing WAL, the time line can't be changing,
8722- * so no lock is required.
8721+ * If we're writing and flushing WAL, the time line can't be changing, so
8722+ * no lock is required.
87238723 */
87248724 if (insertTLI )
87258725 * insertTLI = XLogCtl -> InsertTimeLineID ;
0 commit comments