summaryrefslogtreecommitdiff
path: root/src/include/postmaster
diff options
context:
space:
mode:
authorTom Lane2007-07-24 04:54:09 +0000
committerTom Lane2007-07-24 04:54:09 +0000
commitad4295728e04f4107f4dcbbee4950e526becb95d (patch)
treeb816acb0fe3fa95d884f95aa916d8582cf8c7c77 /src/include/postmaster
parent53d2951be7687089885865f31949eda87439a80b (diff)
Create a new dedicated Postgres process, "wal writer", which exists to write
and fsync WAL at convenient intervals. For the moment it just tries to offload this work from backends, but soon it will be responsible for guaranteeing a maximum delay before asynchronously-committed transactions will be flushed to disk. This is a portion of Simon Riggs' async-commit patch, committed to CVS separately because a background WAL writer seems like it might be a good idea independently of the async-commit feature. I rebased walwriter.c on bgwriter.c because it seemed like a more appropriate way of handling signals; while the startup/shutdown logic in postmaster.c is more like autovac because we want walwriter to quit before we start the shutdown checkpoint.
Diffstat (limited to 'src/include/postmaster')
-rw-r--r--src/include/postmaster/walwriter.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/include/postmaster/walwriter.h b/src/include/postmaster/walwriter.h
new file mode 100644
index 00000000000..3cefe9ad7ba
--- /dev/null
+++ b/src/include/postmaster/walwriter.h
@@ -0,0 +1,20 @@
+/*-------------------------------------------------------------------------
+ *
+ * walwriter.h
+ * Exports from postmaster/walwriter.c.
+ *
+ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
+ *
+ * $PostgreSQL: pgsql/src/include/postmaster/walwriter.h,v 1.1 2007/07/24 04:54:09 tgl Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef _WALWRITER_H
+#define _WALWRITER_H
+
+/* GUC options */
+extern int WalWriterDelay;
+
+extern void WalWriterMain(void);
+
+#endif /* _WALWRITER_H */