PG_TEST_FSYNC(1)

πŸ“¦ version 17.11, in opensuse-leap 16.0

πŸ’… 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 the pg_wal directory is or will be placed in (pg_wal contains the WAL files, fyi). the default is pg_test_fsync.out in 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 is 5 seconds, which allows the program to complete in under 2 minutes. we love a reasonable runtime 🫢
  • -V, --version β€” print the pg_test_fsync version and exit. short and sweet πŸ’«
  • -?, --help β€” show help about pg_test_fsync command line arguments, and exit. when in doubt, ask the program itself πŸ™ˆ

🌈 ENVIRONMENT

  • PG_COLOR β€” specifies whether to use color in diagnostic messages. possible values are always, auto and never. 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 πŸ’…πŸŽ€πŸ¦‹πŸ’–