Skip to content

Commit f75d6a1

Browse files
committed
Add mention of using tools/fsync to test fsync methods. Restructure
recent wal_sync_method doc paragraph to be clearer.
1 parent 604ab08 commit f75d6a1

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

doc/src/sgml/config.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,13 +1569,13 @@ SET ENABLE_SEQSCAN TO OFF;
15691569
</itemizedlist>
15701570
<para>
15711571
Not all of these choices are available on all platforms.
1572-
The default is the first method in the above list that is supported
1573-
by the platform. The default is not necessarily best; it may be
1574-
necessary to change this setting, or other aspects of your system
1575-
configuration, in order to create a crash-safe configuration, as
1576-
discussed in <xref linkend="wal-reliability">, or to achieve best
1577-
performance.
15781572
The <literal>open_</>* options also use <literal>O_DIRECT</> if available.
1573+
The default is the first method in the above list that is supported
1574+
by the platform. The default is not necessarily ideal; it might be
1575+
necessary to change this setting or other aspects of your system
1576+
configuration in order to create a crash-safe configuration or
1577+
achieve optimal performance.
1578+
These aspects are discussed in <xref linkend="wal-reliability">.
15791579
The utility <filename>src/tools/fsync</> in the PostgreSQL source tree
15801580
can do performance testing of various fsync methods.
15811581
This parameter can only be set in the <filename>postgresql.conf</>

doc/src/sgml/wal.sgml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,13 @@
530530
<para>
531531
The <xref linkend="guc-wal-sync-method"> parameter determines how
532532
<productname>PostgreSQL</productname> will ask the kernel to force
533-
<acronym>WAL</acronym> updates out to disk.
534-
With the exception of <literal>fsync_writethrough</>, which can sometimes
535-
force a flush of the disk cache even when other options do not do so,
536-
all the options should be the same in terms of reliability.
537-
However, it's quite platform-specific which one will be the fastest.
533+
<acronym>WAL</acronym> updates out to disk.
534+
All the options should be the same in terms of reliability, with
535+
the exception of <literal>fsync_writethrough</>, which can sometimes
536+
force a flush of the disk cache even when other options do not do so.
537+
However, it's quite platform-specific which one will be the fastest;
538+
you can test option speeds using the utility <filename>src/tools/fsync</>
539+
in the PostgreSQL source tree.
538540
Note that this parameter is irrelevant if <varname>fsync</varname>
539541
has been turned off.
540542
</para>

0 commit comments

Comments
 (0)