PostgreSQL 18 io_method Configuration
io_method is a new PostgreSQL 18 configuration parameter that controls how read operations are dispatched to storage.
Available Options
| Value | Description | Platform |
|---|---|---|
sync |
Synchronous blocking reads (legacy PG17 behavior) | All |
worker |
Dedicated I/O worker processes (default) | All |
io_uring |
Linux kernel ring buffer for minimal syscall overhead | Linux 5.1+ |
Performance Comparison
Benchmark results for sequential scan on cold cache:
| Method | Time | Improvement |
|---|---|---|
| sync | 15,071ms | Baseline |
| worker | 10,052ms | 1.5x faster |
| io_uring | 5,723ms | 2.6x faster |
Configuration
-- Check current setting
SHOW io_method;
-- Set in postgresql.conf
io_method = 'io_uring' -- For Linux with kernel 5.1+
io_method = 'worker' -- Cross-platform default
When to Use Each
io_uring: Best for Linux production servers with high I/O workloadsworker: Safe default for cross-platform compatibilitysync: Only for debugging or compatibility testing
Current Limitations
- AIO only applies to reads (sequential scans, bitmap heap scans, vacuum)
- Index scans don't use AIO yet
- Write operations and WAL still use synchronous I/O
Source: PostgreSQL 18 Documentation - Runtime Configuration
https://www.postgresql.org/docs/18/runtime-config-resource.html