IO: WalsenderTimelineHistoryRead
Waiting for a read from a timeline history file during a walsender timeline command
PostgreSQL wait event dossier
ClassIO
Event
WalsenderTimelineHistoryRead
VersionsPG 17-18
Evidence4 source location(s)
Official description
Waiting for a read from a timeline history file during a walsender timeline command
| PG 13 | PG 14 | PG 15 | PG 16 | PG 17 | PG 18 |
|---|---|---|---|---|---|
| — | — | — | — | ✓ | ✓ |
Earlier names: IO/WALSenderTimelineHistoryRead (PG 13-16)
Trigger mechanism
WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ at src/backend/replication/walsender.c:654 is the grep-verified reporting path. The public identity/resource is mapped at src/backend/utils/activity/wait_event.c:730. The instrumented operation is: Waiting for a read from a timeline history file during a walsender timeline command. PostgreSQL reports WalsenderTimelineHistoryRead around the instrumented file or asynchronous-I/O operation named by this event. The backend resumes after the kernel, storage stack, or I/O worker completes that step.
Normal or trouble?
- Normal: The wait is normal when the workload is expected to perform this read, write, sync, allocation, or completion operation at the observed rate.
- Investigate: Investigate when it persists with foreground latency, many concurrent waiters, storage tail latency, throttling, or errors.
Diagnostic SQL
Sessions waiting on IO/WalsenderTimelineHistoryRead
Current IO cohort
Lock and relation context for these sessions
Response
- Confirm the workload phase should touch this file class.
- Correlate with pg_stat_io where available and per-device latency.
- Fix the access path, burst shape, or affected storage tier before tuning unrelated memory settings.
Source evidence
- PostgreSQL 16.15 · src/backend/replication/walsender.c:654 —
WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ - PostgreSQL 16.15 · src/backend/utils/activity/wait_event.c:730 —
WALSenderTimelineHistoryRead - PostgreSQL 18.6 · src/backend/replication/walsender.c:637 —
WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ - PostgreSQL 18.6 · src/backend/utils/activity/wait_event_names.txt:263 —
WALSENDER_TIMELINE_HISTORY_READ
Related controls and signals
- GUCs: [guc:wal_buffers] · [guc:synchronous_commit]
- Metrics: [metric:waiting_sessions] · [metric:wait_event_share] · [metric:wal_bytes] · [metric:wal_write_time] · [metric:io_read_time] · [metric:io_write_time]