2 .\" Title: pg_test_fsync
3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "PG_TEST_FSYNC" "1" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 pg_test_fsync \- determine fastest \fIwal_sync_method\fR for PostgreSQL
33 .HP \w'\fBpg_test_fsync\fR\ 'u
34 \fBpg_test_fsync\fR [\fIoption\fR...]
38 is intended to give you a reasonable idea of what the fastest
40 is on your specific system, as well as supplying diagnostic information in the event of an identified I/O problem\&. However, differences shown by
42 might not make any significant difference in real database throughput, especially since many database servers are not speed\-limited by their write\-ahead logs\&.
44 reports average file sync operation time in microseconds for each
45 wal_sync_method, which can also be used to inform efforts to optimize the value of
50 accepts the following command\-line options:
56 Specifies the file name to write test data in\&. This file should be in the same file system that the
58 directory is or will be placed in\&. (pg_wal
61 files\&.) The default is
63 in the current directory\&.
68 \fB\-\-secs\-per\-test\fR
70 Specifies the number of seconds for each test\&. The more time per test, the greater the test\*(Aqs accuracy, but the longer it takes to run\&. The default is 5 seconds, which allows the program to complete in under 2 minutes\&.
88 command line arguments, and exit\&.
92 The environment variable
94 specifies whether to use color in diagnostic messages\&. Possible values are