/*
* Take a snapshot of running transactions and write this to WAL.
* This allows us to reconstruct the state of running transactions
- * during archive recovery, if required. We do this even if we are
- * not archiving, to allow a cold physical backup of the server to
- * be useful as a read only standby.
+ * during archive recovery, if required.
*/
- GetRunningTransactionData();
+ if (XLogArchivingActive() && XLogArchiveCommandSet())
+ GetRunningTransactionData();
/*
* If archiving is enabled, rotate the last XLOG file so that all the
RequestXLogSwitch();
CreateCheckPoint(CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_IMMEDIATE);
+
+ /*
+ * Take a snapshot of running transactions and write this to WAL.
+ * This allows us to reconstruct the state of running transactions
+ * during archive recovery, if required. We do this even if we are
+ * not archiving, to allow a cold physical backup of the server to
+ * be useful as a read only standby.
+ */
+ GetRunningTransactionData();
}
ShutdownCLOG();
ShutdownSUBTRANS();