4 pg_test_fsync — determine fastest wal_sync_method for PostgreSQL
8 pg_test_fsync [option...]
12 pg_test_fsync is intended to give you a reasonable idea of what the
13 fastest wal_sync_method is on your specific system, as well as
14 supplying diagnostic information in the event of an identified I/O
15 problem. However, differences shown by pg_test_fsync might not make any
16 significant difference in real database throughput, especially since
17 many database servers are not speed-limited by their write-ahead logs.
18 pg_test_fsync reports average file sync operation time in microseconds
19 for each wal_sync_method, which can also be used to inform efforts to
20 optimize the value of commit_delay.
24 pg_test_fsync accepts the following command-line options:
28 Specifies the file name to write test data in. This file should
29 be in the same file system that the pg_wal directory is or will
30 be placed in. (pg_wal contains the WAL files.) The default is
31 pg_test_fsync.out in the current directory.
35 Specifies the number of seconds for each test. The more time per
36 test, the greater the test's accuracy, but the longer it takes
37 to run. The default is 5 seconds, which allows the program to
38 complete in under 2 minutes.
42 Print the pg_test_fsync version and exit.
46 Show help about pg_test_fsync command line arguments, and exit.
50 The environment variable PG_COLOR specifies whether to use color in
51 diagnostic messages. Possible values are always, auto and never.