PG_TEST_FSYNC(1)
π PG_TEST_FSYNC(1) β the page, the myth, the legend π
okay so bestie, welcome to PG_TEST_FSYNC(1), straight out of the PostgreSQL 17.11 documentation era. this little icon exists for one reason and one reason only: telling you which wal_sync_method is the fastest on your specific system. let's get into it β¨
πΈ NAME
pg_test_fsync β determine fastest wal_sync_method for PostgreSQL π§
π¦ SYNOPSIS
pg_test_fsync [option...]
literally that's it. options only. no positional drama, no main character arguments. iykyk π
π DESCRIPTION
so here's the vibe: pg_test_fsync is intended to give you a reasonable idea of what the fastest wal_sync_method is on your specific system, and it also supplies diagnostic information in the event of an identified I/O problem. slay. π©Ίβ¨
but ngl, keep your expectations in check β differences shown by pg_test_fsync might not make any significant difference in real database throughput, especially since many database servers are not speed-limited by their write-ahead logs. like, it's giving "measurement accurate, real world unbothered" π
what it actually does: it reports the average file sync operation time in microseconds for each wal_sync_method. and that number is genuinely useful! it can also be used to inform efforts to optimize the value of commit_delay. data-driven queen π
β¨ OPTIONS β¨
pg_test_fsync accepts the following command-line options:
-f,--filenameβ specifies the file name to write test data in. bestie, this file should be in the same file system that thepg_waldirectory is or will be placed in (pg_walcontains the WAL files, fyi). the default ispg_test_fsync.outin the current directory. π-s,--secs-per-testβ specifies the number of seconds for each test. more time per test = greater accuracy, but also a longer wait, so pick your fighter βοΈ. the default is5seconds, which allows the program to complete in under 2 minutes. we love a reasonable runtime π«Ά-V,--versionβ print thepg_test_fsyncversion and exit. short and sweet π«-?,--helpβ show help aboutpg_test_fsynccommand line arguments, and exit. when in doubt, ask the program itself π
π ENVIRONMENT
PG_COLORβ specifies whether to use color in diagnostic messages. possible values arealways,autoandnever. yes, you can make your diagnostics cute on purpose π¨π
quick reminder: these are the only values. don't go inventing sometimes and acting surprised when it doesn't vibe check π
π SEE ALSO
postgres(1)β the main character, obviously. go say hi π
and that's the whole page, no cap. this beauty shipped with PostgreSQL 17.11, dated 2026, and it goes by PG_TEST_FSYNC(1) β take care of her, she's iconic π ππ¦π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17-contrib 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17-contrib 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17-contrib 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17-contrib 17.11-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms