Repair memory leaks in plpython.
[pgsql.git] / doc / src / sgml / ref / pgtestfsync.sgml
blobe811f80bf40c123150fb49b3abd4ae04d62dfe3b
1 <!--
2 doc/src/sgml/ref/pgtestfsync.sgml
3 PostgreSQL documentation
4 -->
6 <refentry id="pgtestfsync">
7 <indexterm zone="pgtestfsync">
8 <primary>pg_test_fsync</primary>
9 </indexterm>
11 <refmeta>
12 <refentrytitle><application>pg_test_fsync</application></refentrytitle>
13 <manvolnum>1</manvolnum>
14 <refmiscinfo>Application</refmiscinfo>
15 </refmeta>
17 <refnamediv>
18 <refname>pg_test_fsync</refname>
19 <refpurpose>determine fastest <varname>wal_sync_method</varname> for <productname>PostgreSQL</productname></refpurpose>
20 </refnamediv>
22 <refsynopsisdiv>
23 <cmdsynopsis>
24 <command>pg_test_fsync</command>
25 <arg rep="repeat"><replaceable>option</replaceable></arg>
26 </cmdsynopsis>
27 </refsynopsisdiv>
29 <refsect1>
30 <title>Description</title>
32 <para>
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
35 specific system,
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"/>.
44 </para>
45 </refsect1>
47 <refsect1>
48 <title>Options</title>
50 <para>
51 <application>pg_test_fsync</application> accepts the following
52 command-line options:
54 <variablelist>
56 <varlistentry>
57 <term><option>-f</option></term>
58 <term><option>--filename</option></term>
59 <listitem>
60 <para>
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
66 directory.
67 </para>
68 </listitem>
69 </varlistentry>
71 <varlistentry>
72 <term><option>-s</option></term>
73 <term><option>--secs-per-test</option></term>
74 <listitem>
75 <para>
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.
80 </para>
81 </listitem>
82 </varlistentry>
84 <varlistentry>
85 <term><option>-V</option></term>
86 <term><option>--version</option></term>
87 <listitem>
88 <para>
89 Print the <application>pg_test_fsync</application> version and exit.
90 </para>
91 </listitem>
92 </varlistentry>
94 <varlistentry>
95 <term><option>-?</option></term>
96 <term><option>--help</option></term>
97 <listitem>
98 <para>
99 Show help about <application>pg_test_fsync</application> command line
100 arguments, and exit.
101 </para>
102 </listitem>
103 </varlistentry>
104 </variablelist>
105 </para>
107 </refsect1>
109 <refsect1>
110 <title>Environment</title>
112 <para>
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>.
117 </para>
118 </refsect1>
120 <refsect1>
121 <title>See Also</title>
123 <simplelist type="inline">
124 <member><xref linkend="app-postgres"/></member>
125 </simplelist>
126 </refsect1>
127 </refentry>