io_method
How PostgreSQL issues asynchronous reads: worker processes, io_uring or synchronously.
- デフォルト
worker- Range
- sync, worker, io_uring
- Restart needed
- はい
- Default checked on
- PostgreSQL 18
何ができるか
New in PostgreSQL 18. worker hands reads to io_workers background processes; io_uring (Linux, when built with liburing) submits them from the backend directly; sync restores pre-18 behavior.
デフォルト値
worker. worker (PostgreSQL 18; the setting does not exist before 18).
Check the current value
SHOW io_method; SELECT setting, unit, boot_val, context, source, pending_restart FROM pg_settings WHERE name = 'io_method';
Change it
ALTER SYSTEM SET io_method = 'io_uring'; -- applies only after a server restart
Server restart required (pg_settings.context is postmaster). ALTER SYSTEM only stages the new value in postgresql.auto.conf.
When to change it
Try io_uring on recent Linux kernels with fast storage after benchmarking; use sync to rule out the new I/O path when diagnosing a regression after upgrading.
What can go wrong
io_uring is unavailable on builds without liburing and in some container sandboxes that block the syscalls.
Questions about io_method
What is the default value of io_method in PostgreSQL?
worker. worker (PostgreSQL 18; the setting does not exist before 18).
Does changing io_method require a restart?
Yes. Server restart required (pg_settings.context is postmaster). ALTER SYSTEM only stages the new value in postgresql.auto.conf.
When should I change io_method?
Try io_uring on recent Linux kernels with fast storage after benchmarking; use sync to rule out the new I/O path when diagnosing a regression after upgrading.
Back to all PostgreSQL settings, or check the PostgreSQL manual for every option.
Check io_method 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.