2 doc/src/sgml/ref/pgtestfsync.sgml
3 PostgreSQL documentation
6 <refentry id=
"pgtestfsync">
7 <indexterm zone=
"pgtestfsync">
8 <primary>pg_test_fsync
</primary>
12 <refentrytitle><application>pg_test_fsync
</application></refentrytitle>
13 <manvolnum>1</manvolnum>
14 <refmiscinfo>Application
</refmiscinfo>
18 <refname>pg_test_fsync
</refname>
19 <refpurpose>determine fastest
<varname>wal_sync_method
</varname> for
<productname>PostgreSQL
</productname></refpurpose>
24 <command>pg_test_fsync
</command>
25 <arg rep=
"repeat"><replaceable>option
</replaceable></arg>
30 <title>Description
</title>
33 <application>pg_test_fsync
</application> is intended to give you a reasonable
34 idea of what the fastest
<xref linkend=
"guc-wal-sync-method"/> is on your
36 as well as supplying diagnostic information in the event of an identified I/O
37 problem. However, differences shown by
38 <application>pg_test_fsync
</application> might not make any significant
39 difference in real database throughput, especially since many database servers
40 are not speed-limited by their write-ahead logs.
41 <application>pg_test_fsync
</application> reports average file sync operation
42 time in microseconds for each
<literal>wal_sync_method
</literal>, which can also be used to
43 inform efforts to optimize the value of
<xref linkend=
"guc-commit-delay"/>.
48 <title>Options
</title>
51 <application>pg_test_fsync
</application> accepts the following
57 <term><option>-f
</option></term>
58 <term><option>--filename
</option></term>
61 Specifies the file name to write test data in.
62 This file should be in the same file system that the
63 <filename>pg_wal
</filename> directory is or will be placed in.
64 (
<filename>pg_wal
</filename> contains the
<acronym>WAL
</acronym> files.)
65 The default is
<filename>pg_test_fsync.out
</filename> in the current
72 <term><option>-s
</option></term>
73 <term><option>--secs-per-test
</option></term>
76 Specifies the number of seconds for each test. The more time
77 per test, the greater the test's accuracy, but the longer it takes
78 to run. The default is
5 seconds, which allows the program to
79 complete in under
2 minutes.
85 <term><option>-V
</option></term>
86 <term><option>--version
</option></term>
89 Print the
<application>pg_test_fsync
</application> version and exit.
95 <term><option>-?
</option></term>
96 <term><option>--help
</option></term>
99 Show help about
<application>pg_test_fsync
</application> command line
110 <title>Environment
</title>
113 The environment variable
<envar>PG_COLOR
</envar> specifies whether to use
114 color in diagnostic messages. Possible values are
115 <literal>always
</literal>,
<literal>auto
</literal> and
116 <literal>never
</literal>.
121 <title>See Also
</title>
123 <simplelist type=
"inline">
124 <member><xref linkend=
"app-postgres"/></member>