]> granicus.if.org Git - postgresql/blobdiff - src/backend/access/transam/commit_ts.c
Phase 2 of pgindent updates.
[postgresql] / src / backend / access / transam / commit_ts.c
index 20f60bc02366106267a4e18d01324ff18f2aba0d..7646c23c4e7fa6e24a75cddb8263b95bf46bdd20 100644 (file)
@@ -3,7 +3,7 @@
  * commit_ts.c
  *             PostgreSQL commit timestamp manager
  *
- * This module is a pg_clog-like system that stores the commit timestamp
+ * This module is a pg_xact-like system that stores the commit timestamp
  * for each transaction.
  *
  * XLOG interactions: this module generates an XLOG record whenever a new
@@ -746,6 +746,12 @@ ShutdownCommitTs(void)
 {
        /* Flush dirty CommitTs pages to disk */
        SimpleLruFlush(CommitTsCtl, false);
+
+       /*
+        * fsync pg_commit_ts to ensure that any files flushed previously are
+        * durably on disk.
+        */
+       fsync_fname("pg_commit_ts", true);
 }
 
 /*
@@ -756,6 +762,12 @@ CheckPointCommitTs(void)
 {
        /* Flush dirty CommitTs pages to disk */
        SimpleLruFlush(CommitTsCtl, true);
+
+       /*
+        * fsync pg_commit_ts to ensure that any files flushed previously are
+        * durably on disk.
+        */
+       fsync_fname("pg_commit_ts", true);
 }
 
 /*