File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/backend/access/transam Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.340 2009/05/15 15:56:39 tgl Exp $
10
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.341 2009/05/28 11:02:16 heikki Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -6085,7 +6085,18 @@ ShutdownXLOG(int code, Datum arg)
6085
6085
if (RecoveryInProgress ())
6086
6086
CreateRestartPoint (CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_IMMEDIATE );
6087
6087
else
6088
+ {
6089
+ /*
6090
+ * If archiving is enabled, rotate the last XLOG file so that all the
6091
+ * remaining records are archived (postmaster wakes up the archiver
6092
+ * process one more time at the end of shutdown). The checkpoint
6093
+ * record will go to the next XLOG file and won't be archived (yet).
6094
+ */
6095
+ if (XLogArchivingActive () && XLogArchiveCommandSet ())
6096
+ RequestXLogSwitch ();
6097
+
6088
6098
CreateCheckPoint (CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_IMMEDIATE );
6099
+ }
6089
6100
ShutdownCLOG ();
6090
6101
ShutdownSUBTRANS ();
6091
6102
ShutdownMultiXact ();
You can’t perform that action at this time.
0 commit comments