Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita75dbf7

Browse files
committed
StartupXLOG: Call CleanupAfterArchiveRecovery after XLogReportParameters.
This does a better job grouping related operations together, sinceall of the WAL records that we need to write prior to allowing WALwrites generally and written by a single uninterrupted stretch of code.Since CleanupAfterArchiveRecovery() just (1) runs recovery_end_command,(2) removes non-parent xlog files, and (3) archives any final partialsegment, this should be safe, because all of those things are prettymuch unrelated to the WAL record written by XLogReportParameters().Amul Sul, per a suggestion from meDiscussion:http://postgr.es/m/CAAJ_b97fysj6sRSQEfOHj-y8Jfd5uPqOgO74qast89B4WfD+TA@mail.gmail.com
1 parent166f943 commita75dbf7

File tree

1 file changed

+4
-4
lines changed
  • src/backend/access/transam

1 file changed

+4
-4
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8094,17 +8094,17 @@ StartupXLOG(void)
80948094
if (!XLogRecPtrIsInvalid(XLogCtl->lastReplayedEndRecPtr))
80958095
promoted=PerformRecoveryXLogAction();
80968096

8097-
/* If this is archive recovery, perform post-recovery cleanup actions. */
8098-
if (ArchiveRecoveryRequested)
8099-
CleanupAfterArchiveRecovery(EndOfLogTLI,EndOfLog);
8100-
81018097
/*
81028098
* If any of the critical GUCs have changed, log them before we allow
81038099
* backends to write WAL.
81048100
*/
81058101
LocalSetXLogInsertAllowed();
81068102
XLogReportParameters();
81078103

8104+
/* If this is archive recovery, perform post-recovery cleanup actions. */
8105+
if (ArchiveRecoveryRequested)
8106+
CleanupAfterArchiveRecovery(EndOfLogTLI,EndOfLog);
8107+
81088108
/*
81098109
* Local WAL inserts enabled, so it's time to finish initialization of
81108110
* commit timestamp.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp