{"Entry":{"collection":"guc","key":"track_wal_io_timing","name":"track_wal_io_timing","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Statistics / Cumulative Query and Index Statistics","category_zh":"","changed_in":["15"],"changes":[{"documentation_changed":false,"fields":{},"from":"13","status":"added","to":"14"},{"documentation_changed":true,"fields":{"category":{"from":"Statistics / Query and Index Statistics Collector","to":"Statistics / Cumulative Query and Index Statistics"}},"from":"14","status":"changed","to":"15"},{"documentation_changed":true,"fields":{},"from":"17","status":"changed","to":"18"}],"content_hash":"dda42413468fafbb82cf36573d4d157ce1023059806ad0d3a4ece0f566706b91","context":"","default_changed_in":[],"default_history":[{"from":"14","to":"19","value":"off"}],"editorial":{"advice":{"olap":"Read-heavy analytics may gain little from WAL timing, while bulk loads and refresh jobs can benefit substantially. Enable it for the write phases that use the evidence rather than because the workload is labeled OLAP.","oltp":"Enable it when WAL write and sync waits must be separated from relation I/O during commit-latency analysis. Measure platform clock overhead and correlate the counters with synchronous_commit, wal_sync_method, and storage behavior.","small":"Keep off unless WAL latency is an active diagnostic need and clock reads are inexpensive. Pair it with track_io_timing only when both WAL and non-WAL wait separation is useful."},"mechanism":["track_wal_io_timing measures wait time for WAL I/O and exposes it under the wal object in pg_stat_io and pg_stat_get_backend_io(). It is independent of ordinary database I/O timing.","Collection repeatedly reads the operating-system clock and can add platform-dependent overhead. pg_test_timing measures clock-read cost, while workload tests reveal aggregate impact.","It does not change wal_sync_method, durability, or WAL throughput. Pairing it with track_io_timing separates WAL waits from relation and temporary-file I/O. Its superuser context permits an authorized session change without a server restart."],"pitfalls":["Expecting WAL timing to include relation and temporary-file I/O measured by track_io_timing.","Treating elapsed WAL waits as pure device service time.","Assuming the switch changes durability, wal_sync_method, or WAL throughput.","Enabling it without measuring clock-read overhead on the production platform."],"references":[{"title":"PostgreSQL 19 Beta 4: track_wal_io_timing","url":"https://www.postgresql.org/docs/19/runtime-config-statistics.html#GUC-TRACK-WAL-IO-TIMING"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["track_io_timing","wal_sync_method","synchronous_commit","track_counts","stats_fetch_consistency"],"summary":"track_wal_io_timing — Collects timing statistics for WAL I/O activity. Observed in PG14–19 Beta 4; its last measured boot default is off in PG19 Beta 4, with superuser context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"14","group":"Statistics","group_slug":"statistics","imported_at":"2026-09-27T17:57:32.223358+08:00","intro_commit":{"authored_at":"2021-03-09T16:52:06+09:00","discussion":["https://postgr.es/m/0509ad67b585a5b86a83d445dfa75392@oss.nttdata.com"],"hash":"ff99918c625a84c91e7391db9032112ec8653623","subject":"Track total amounts of times spent writing and syncing WAL data to disk.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=ff99918c625a84c91e7391db9032112ec8653623"},"key":"track_wal_io_timing","last_version":"20","max_val":"","min_val":"","name":"track_wal_io_timing","position":432,"present_in":["14","15","16","17","18","19","20"],"short_desc":"Enables timing of WAL I/O waits.","short_desc_zh":"","source_rev":"english-manuals:9f3af2ebff619f030a72872af7b9c6fd8b5322c12a6b592418fe60d9f0d10d91","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"track_wal_io_timing","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"track_wal_io_timing","SourceRevision":"english-manuals:9f3af2ebff619f030a72872af7b9c6fd8b5322c12a6b592418fe60d9f0d10d91","Facts":{"boot_val":"off","category":"Statistics / Cumulative Query and Index Statistics","context":"superuser","description":"Enables timing of WAL I/O waits. This parameter is off by default, as it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. You can use the pg_test_timing tool to measure the overhead of timing on your system. I/O timing information is displayed in pg_stat_io for the object wal and in the output of the pg_stat_get_backend_io() function for the object wal. Only superusers and users with the appropriate SET privilege can change this setting.","doc":{"anchor":"GUC-TRACK-WAL-IO-TIMING","file":"runtime-config-statistics.html","lang":"en","sha256":"90db46d4b011d54f415934fcc658b0841d07af25ae591483c2139ba0e114ed21","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"track_wal_io_timing","short_desc":"Collects timing statistics for WAL I/O activity.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-TRACK-WAL-IO-TIMING","file":"runtime-config-statistics.html","lang":"en","sha256":"90db46d4b011d54f415934fcc658b0841d07af25ae591483c2139ba0e114ed21","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"track_wal_io_timing","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"track_wal_io_timing","Summary":"","BodyHTML":"\u003cp\u003e启用 WAL I/O 等待的计时。此参数默认关闭，因为它会反复向操作系统查询当前时间，可能在某些平台上产生显著开销。可以使用 \u003cspan\u003epg_test_timing\u003c/span\u003e 工具测量系统上的计时开销。I/O 计时信息显示在 \u003ca href=\"/docs/18/monitoring-stats.html#MONITORING-PG-STAT-IO-VIEW\" rel=\"nofollow\"\u003e\u003ccode\u003epg_stat_io\u003c/code\u003e\u003c/a\u003e 中 \u003ccode\u003eobject\u003c/code\u003e 为 \u003ccode\u003ewal\u003c/code\u003e 的行，以及 \u003ca href=\"/docs/18/monitoring-stats.html#PG-STAT-GET-BACKEND-IO\" rel=\"nofollow\"\u003e\u003ccode\u003epg_stat_get_backend_io()\u003c/code\u003e\u003c/a\u003e 函数输出中 \u003ccode\u003eobject\u003c/code\u003e 为 \u003ccode\u003ewal\u003c/code\u003e 的行。只有超级用户和具有适当 \u003ccode\u003eSET\u003c/code\u003e 权限的用户才能更改此设置。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"543b9b51945eb622c6b61acf33b66d62e325559ea93d214cfe0b14f78f942a06","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e启用 WAL I/O 等待的计时。此参数默认关闭，因为它会反复向操作系统查询当前时间，可能在某些平台上产生显著开销。可以使用 \u003cspan class=\"application\"\u003epg_test_timing\u003c/span\u003e 工具测量系统上的计时开销。I/O 计时信息显示在 \u003ca href=\"/docs/18/monitoring-stats.html#MONITORING-PG-STAT-IO-VIEW\" title=\"27.2.13. pg_stat_io\"\u003e\u003ccode class=\"structname\"\u003epg_stat_io\u003c/code\u003e\u003c/a\u003e 中 \u003ccode class=\"varname\"\u003eobject\u003c/code\u003e 为 \u003ccode class=\"literal\"\u003ewal\u003c/code\u003e 的行，以及 \u003ca href=\"/docs/18/monitoring-stats.html#PG-STAT-GET-BACKEND-IO\"\u003e\u003ccode class=\"function\"\u003epg_stat_get_backend_io()\u003c/code\u003e\u003c/a\u003e 函数输出中 \u003ccode class=\"varname\"\u003eobject\u003c/code\u003e 为 \u003ccode class=\"literal\"\u003ewal\u003c/code\u003e 的行。只有超级用户和具有适当 \u003ccode class=\"literal\"\u003eSET\u003c/code\u003e 权限的用户才能更改此设置。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
