{"Entry":{"collection":"waitevent","key":"io/WalsenderTimelineHistoryRead","name":"WalsenderTimelineHistoryRead","aliases":["WALSenderTimelineHistoryRead","WalsenderTimelineHistoryRead"],"metadata":{"aliases":["WALSenderTimelineHistoryRead","WalsenderTimelineHistoryRead"],"changed_in":["13","17"],"changes":[{"from":"9.6","moved":null,"renamed":null,"reworded":null,"status":"added","to":"10"},{"from":"12","moved":null,"renamed":null,"reworded":{"from":"Waiting for a read from a timeline history file during walsender timeline command.","to":"Waiting for a read from a timeline history file during a walsender timeline command."},"status":"changed","to":"13"},{"from":"16","moved":null,"renamed":{"from":"WALSenderTimelineHistoryRead","to":"WalsenderTimelineHistoryRead"},"reworded":null,"status":"changed","to":"17"}],"content_hash":"29025b5efe53a548477687ad2aa038fc37648c027a3976d37b9de2630f5c7cab","dossier":{"actions":{"en":["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."],"zh":["确认当前负载阶段本来就应访问这类文件。","在可用版本上关联 pg_stat_io 与具体设备延迟。","先修复访问路径、突发形状或受影响存储层，再调整无关的内存参数。"]},"diagnostic_sql":[{"id":"sessions","min_version":"13","sql":"SELECT pid, backend_type, usename, datname, application_name,\n       state, now() - query_start AS query_age,\n       now() - xact_start AS xact_age,\n       wait_event_type, wait_event,\n       pg_blocking_pids(pid) AS blocking_pids,\n       left(query, 160) AS query\nFROM pg_stat_activity\nWHERE wait_event_type = 'IO'\n  AND wait_event = 'WalsenderTimelineHistoryRead'\nORDER BY query_age DESC NULLS LAST;","title":"Sessions waiting on IO/WalsenderTimelineHistoryRead","title_zh":"正在等待 IO/WalsenderTimelineHistoryRead 的会话"},{"id":"cohort","min_version":"13","sql":"SELECT wait_event, count(*) AS waiting_sessions,\n       count(*) FILTER (WHERE state = 'active') AS active_waiters,\n       max(now() - query_start) AS oldest_query\nFROM pg_stat_activity\nWHERE wait_event_type = 'IO'\nGROUP BY wait_event\nORDER BY waiting_sessions DESC, wait_event;","title":"Current IO cohort","title_zh":"当前 IO 等待分布"},{"id":"lock_objects","min_version":"13","sql":"SELECT a.pid, l.locktype, l.mode, l.granted, l.fastpath,\n       d.datname, n.nspname, c.relname,\n       l.page, l.tuple, l.virtualxid, l.transactionid,\n       l.classid, l.objid, l.objsubid\nFROM pg_stat_activity AS a\nLEFT JOIN pg_locks AS l ON l.pid = a.pid\nLEFT JOIN pg_database AS d ON d.oid = l.database\nLEFT JOIN pg_class AS c\n  ON c.oid = l.relation\n AND l.database = (\n       SELECT oid FROM pg_database WHERE datname = current_database()\n     )\nLEFT JOIN pg_namespace AS n ON n.oid = c.relnamespace\nWHERE a.wait_event_type = 'IO'\n  AND a.wait_event = 'WalsenderTimelineHistoryRead'\nORDER BY a.pid, l.granted, l.locktype, l.mode;","title":"Lock and relation context for these sessions","title_zh":"这些会话的锁与关系上下文"}],"emission":{"status":"active","verified_release":"18.6"},"gucs":["wal_buffers","synchronous_commit"],"incident_pattern":{"en":"","zh":""},"mechanism":{"en":"`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.","zh":"`WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ` 位于 `src/backend/replication/walsender.c:654`，是经 grep 核验的报告路径。公共身份/资源映射位于 `src/backend/utils/activity/wait_event.c:730`。探针覆盖的操作是：等待在 WAL sender 执行 timeline 命令期间从时间线历史文件中读取数据。PostgreSQL 在 WalsenderTimelineHistoryRead 所表示的文件或异步 I/O 操作周围报告此事件；内核、存储栈或 I/O worker 完成该步骤后，后端继续执行。"},"metrics":["waiting_sessions","wait_event_share","wal_bytes","wal_write_time","io_read_time","io_write_time"],"normal":{"en":"The wait is normal when the workload is expected to perform this read, write, sync, allocation, or completion operation at the observed rate.","zh":"当负载本来就应以当前速率执行对应的读取、写入、同步、分配或完成操作时，这项等待正常。"},"official_descriptions":{"17":"Waiting for a read from a timeline history file during a walsender timeline command","18":"Waiting for a read from a timeline history file during a walsender timeline command"},"record_kind":"event","source_locations":[{"commit":"7d3e000c5961a544302072058a1184e9a588837b","excerpt":"pgstat_report_wait_start(WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ);","grep_pattern":"WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ","grep_verified":true,"kind":"trigger","line":654,"major":16,"path":"src/backend/replication/walsender.c","status":"live_trigger","symbol":"WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ","tag":"REL_16_15","url":"https://github.com/postgres/postgres/blob/REL_16_15/src/backend/replication/walsender.c#L654","version":"16.15"},{"commit":"7d3e000c5961a544302072058a1184e9a588837b","excerpt":"event_name = \"WALSenderTimelineHistoryRead\";","grep_pattern":"WALSenderTimelineHistoryRead","grep_verified":true,"kind":"catalog_definition","line":730,"major":16,"path":"src/backend/utils/activity/wait_event.c","status":"live_trigger","symbol":"WALSenderTimelineHistoryRead","tag":"REL_16_15","url":"https://github.com/postgres/postgres/blob/REL_16_15/src/backend/utils/activity/wait_event.c#L730","version":"16.15"},{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","excerpt":"pgstat_report_wait_start(WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ);","grep_pattern":"WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ","grep_verified":true,"kind":"trigger","line":637,"major":18,"path":"src/backend/replication/walsender.c","status":"live_trigger","symbol":"WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/REL_18_6/src/backend/replication/walsender.c#L637","version":"18.6"},{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","excerpt":"WALSENDER_TIMELINE_HISTORY_READ\t\"Waiting for a read from a timeline history file during a walsender timeline command.\"","grep_pattern":"WALSENDER_TIMELINE_HISTORY_READ","grep_verified":true,"kind":"catalog_definition","line":263,"major":18,"path":"src/backend/utils/activity/wait_event_names.txt","status":"live_trigger","symbol":"WALSENDER_TIMELINE_HISTORY_READ","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/REL_18_6/src/backend/utils/activity/wait_event_names.txt#L263","version":"18.6"}],"source_status":"live_trigger","trouble":{"en":"Investigate when it persists with foreground latency, many concurrent waiters, storage tail latency, throttling, or errors.","zh":"若它持续存在并伴随前台延迟、大量并发等待者、存储长尾延迟、限速或错误，应当调查。"}},"first_version":"10","has_dossier":true,"imported_at":"2026-09-27T17:57:32.690464+08:00","key":"io/walsendertimelinehistoryread","last_version":"20","name":"WalsenderTimelineHistoryRead","position":117,"present_in":["10","11","12","13","14","15","16","17","18","19","20"],"slug":"walsender-timeline-history-read","source_rev":"english-manuals:c6642ba37458e5feeb71682450ab8eab25d4698f815665f3a1b63c11c0fc5a2d","summary":"Waiting for a read from a timeline history file during a walsender timeline command.","summary_zh":"","type":"IO","type_slug":"io","type_variants":["IO"]}},"Definition":{"Collection":"waitevent","Key":"io/WalsenderTimelineHistoryRead","SourceDatabase":"center","Version":"18","SourceTable":"waitevent","SourceKey":"io/walsendertimelinehistoryread","SourceRevision":"english-manuals:c6642ba37458e5feeb71682450ab8eab25d4698f815665f3a1b63c11c0fc5a2d","Facts":{"description":"Waiting for a read from a timeline history file during a walsender timeline command.","description_zh":"","doc":{"anchor":"WAIT-EVENT-IO-TABLE","file":"monitoring-stats.html","lang":"en","sha256":"aa979eed08627fbf715a9d792094a162a73671db5af810f3ab2aad3e073d5722","slug":"18"},"lang":"en","name":"WalsenderTimelineHistoryRead","source":"english-manual","type":"IO","zh_from":""},"ManualEvidence":{"doc":{"anchor":"WAIT-EVENT-IO-TABLE","file":"monitoring-stats.html","lang":"en","sha256":"aa979eed08627fbf715a9d792094a162a73671db5af810f3ab2aad3e073d5722","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"waitevent","Key":"io/WalsenderTimelineHistoryRead","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"WalsenderTimelineHistoryRead","Summary":"在 WAL 发送进程执行时间线命令期间，等待从时间线历史文件读取。","BodyHTML":"\u003cp\u003e在 WAL 发送进程执行时间线命令期间，等待从时间线历史文件读取。\u003c/p\u003e","SourceRevision":"2026-08-31@34d13c8","ContentHash":"48ca63391d8989de1304b785ce30fbc14dbbeff1ef1c3edb004b1ae573170daa","Payload":{"description_zh":"在 WAL 发送进程执行时间线命令期间，等待从时间线历史文件读取。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
