track_io_timing
Collect timing for data file reads and writes.
- Par défaut
off- Range
- on, off
- Restart needed
- Non
- Default checked on
- PostgreSQL 18
Ce que cela fait
Adds I/O time to EXPLAIN (ANALYZE, BUFFERS), pg_stat_statements and pg_stat_database. Costs two clock reads per I/O.
Valeur par défaut
off. off (PostgreSQL 18).
Check the current value
SHOW track_io_timing; SELECT setting, unit, boot_val, context, source, pending_restart FROM pg_settings WHERE name = 'track_io_timing';
Change it
SET track_io_timing = on; -- this session ALTER SYSTEM SET track_io_timing = on; SELECT pg_reload_conf();
No restart. Superusers, or roles granted SET on the parameter (PostgreSQL 15 and later), can SET it per session; a server-wide ALTER SYSTEM change applies after a reload (context is superuser).
When to change it
Turn it on unless pg_test_timing shows slow clock reads on your platform; on modern Linux the cost is negligible.
What can go wrong
Overhead on platforms with slow timers.
Questions about track_io_timing
What is the default value of track_io_timing in PostgreSQL?
off. off (PostgreSQL 18).
Does changing track_io_timing require a restart?
No. No restart. Superusers, or roles granted SET on the parameter (PostgreSQL 15 and later), can SET it per session; a server-wide ALTER SYSTEM change applies after a reload (context is superuser).
When should I change track_io_timing?
Turn it on unless pg_test_timing shows slow clock reads on your platform; on modern Linux the cost is negligible.
Back to all PostgreSQL settings, or check the PostgreSQL manual for every option.
Related on SQLly
Check track_io_timing on your own server
SQLly runs the query above against PostgreSQL and the other engines in this reference, from one desktop app on macOS, Windows and Linux.