aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2012-12-03 22:47:59 -0500
committerBruce Momjian <bruce@momjian.us>2012-12-03 22:47:59 -0500
commit630cd14426dc1daf85163ad417f3a224eb4ac7b0 (patch)
tree23f5fddd97f57407c847a12cad429758d2c0eca6 /doc/src
parent25d1ed04a2c4d176f6428b9eed57344e50f44d77 (diff)
downloadpostgresql-630cd14426dc1daf85163ad417f3a224eb4ac7b0.tar.gz
postgresql-630cd14426dc1daf85163ad417f3a224eb4ac7b0.zip
Add initdb --sync-only option to sync the data directory to durable
storage. Have pg_upgrade use it, and enable server options fsync=off and full_page_writes=off. Document that users turning fsync from off to on should run initdb --sync-only. [ Previous commit was incorrectly applied as a git merge. ]
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml9
-rw-r--r--doc/src/sgml/ref/initdb.sgml11
2 files changed, 20 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index b56070b0fb9..b7df8ce6124 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1697,6 +1697,15 @@ include 'filename'
</para>
<para>
+ For reliable recovery when changing <varname>fsync</varname>
+ off to on, it is necessary to force all modified buffers in the
+ kernel to durable storage. This can be done while the cluster
+ is shutdown or while fsync is on by running <command>initdb
+ --sync-only</command>, running <command>sync</>, unmounting the
+ file system, or rebooting the server.
+ </para>
+
+ <para>
In many situations, turning off <xref linkend="guc-synchronous-commit">
for noncritical transactions can provide much of the potential
performance benefit of turning off <varname>fsync</varname>, without
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index 08ee37e7d86..a1e46eb4c67 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -245,6 +245,17 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>-S</option></term>
+ <term><option>--sync-only</option></term>
+ <listitem>
+ <para>
+ Safely write all database files to disk and exit. This does not
+ perform any of the normal <application>initdb</> operations.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-T <replaceable>CFG</></option></term>
<term><option>--text-search-config=<replaceable>CFG</></option></term>
<listitem>