{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece", "published": "2026-11-03T22:53:55Z", "publisher": "PostgresAI", "article": {"title": "What your Postgres is waiting for, and why the dashboard can't tell you", "url": "https://postgres.ai/blog/20261103-what-postgres-is-waiting-for", "date_published": "2026-11-03T12:00:00Z", "author": "Dmitry Fomin", "publisher": "PostgresAI"}, "grade": "A", "axes": [{"axis": "Factual", "summary": "A \u00b7 0 wrong of 24 checked \u00b7 1 caveat"}, {"axis": "Applicable", "summary": "A \u00b7 0 checked \u00b7 partly assessed"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 4 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "A \u00b7 0 wrong of 9 checked \u00b7 0 caveats \u00b7 partly assessed"}, {"axis": "Safe", "summary": "A \u00b7 0 checked"}], "findings": [{"anchor": "F17", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F17", "claim": "The shares it produces are unbiased estimates\u2026", "title": "Fixed sampling does not guarantee unbiased time shares", "explanation": "Periodic samples need independence from workload timing to support the claimed guarantee. pg_wait_sampling 1.1.11 uses configured periods in collector.c:413\u2013450. Correlated workload phases can distort shares despite many samples. The reported agreement within 2 percentage points remains a separate measurement.", "verdict": "Mostly accurate", "sources": [{"url": "https://github.com/postgrespro/pg_wait_sampling/blob/7e3a5fc937393596c0a51c5881dd63d7208408d1/collector.c#L413-L414", "label": "pg_wait_sampling@v1.1.11 \u00b7 collector.c:413-414"}, {"url": "https://github.com/postgrespro/pg_wait_sampling/blob/7e3a5fc937393596c0a51c5881dd63d7208408d1/collector.c#L449-L450", "label": "pg_wait_sampling@v1.1.11 \u00b7 collector.c:449-450"}]}, {"anchor": "F1", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F1", "claim": "\u2026it writes a 4-byte code for the wait into its own slot in shared memory\u2026", "title": "Wait events use a live 4-byte field", "explanation": "PostgreSQL 18 writes the wait code into shared PGPROC memory and clears it to zero. pg_stat_get_activity converts that code into type and event names. The flag functions themselves neither time nor count waits.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/utils/wait_event.h#L69-L88", "label": "REL_18_6 \u00b7 src/include/utils/wait_event.h:69-88"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/pgstatfuncs.c#L451-L453", "label": "REL_18_6 \u00b7 src/backend/utils/adt/pgstatfuncs.c:451-453"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/proc.c#L539-L540", "label": "REL_18_6 \u00b7 src/backend/storage/lmgr/proc.c:539-540"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L889-L899", "label": "REL_18_6 \u00b7 doc/src/sgml/monitoring.sgml:889-899"}]}, {"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F2", "claim": "With track_io_timing it also reports I/O time.", "title": "track_io_timing adds I/O durations to EXPLAIN", "explanation": "EXPLAIN reports elapsed node time. With track_io_timing, buffer instrumentation also records I/O durations. These totals do not reconstruct individual waits.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/explain.sgml#L185-L190", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/explain.sgml:185-190"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/bufmgr.c#L1962-L1967", "label": "REL_18_6 \u00b7 src/backend/storage/buffer/bufmgr.c:1962-1967"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/executor/instrument.c#L98-L99", "label": "REL_18_6 \u00b7 src/backend/executor/instrument.c:98-99"}]}, {"anchor": "F3", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F3", "claim": "\u2026pg_stat_io , per backend pg_stat_get_backend_io()\u2026", "title": "PostgreSQL 18 exposes aggregate and per-backend I/O counters", "explanation": "pg_stat_io exposes operation counts and time totals. pg_stat_get_backend_io takes a backend PID and returns the same fields. Neither interface provides individual durations or a maximum duration.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L1171-L1193", "label": "REL_18_6 \u00b7 src/backend/catalog/system_views.sql:1171-1193"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L4885-L4887", "label": "REL_18_6 \u00b7 doc/src/sgml/monitoring.sgml:4885-4887"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/pgstatfuncs.c#L1600-L1606", "label": "REL_18_6 \u00b7 src/backend/utils/adt/pgstatfuncs.c:1600-1606"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F4", "claim": "\u2026pg_blocking_pids() the blocker's PID while the wait is in progress\u2026", "title": "pg_blocking_pids reports current lock blockers", "explanation": "pg_blocking_pids reads a snapshot of lock-manager state. It returns blocker PIDs while the target is blocked.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L24996-L25000", "label": "REL_18_6 \u00b7 doc/src/sgml/func.sgml:24996-25000"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/lockfuncs.c#L475-L476", "label": "REL_18_6 \u00b7 src/backend/utils/adt/lockfuncs.c:475-476"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F5", "claim": "\u2026deadlock_timeout (1 s by default)\u2026", "title": "deadlock_timeout defaults to 1 second", "explanation": "deadlock_timeout defaults to 1,000 milliseconds in PostgreSQL 18. It schedules deadlock checks and sets the log_lock_waits threshold. Administrators can lower it when investigating short locking delays.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2266-L2274", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:2266-2274"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L11270-L11274", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:11270-11274"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F7", "claim": "\u2026pg_wait_sampling keeps the last 5,000 samples by default\u2026", "title": "pg_wait_sampling defaults match the article", "explanation": "pg_wait_sampling 1.1.11 defaults to a 5,000-entry history and 10-millisecond history and profile periods. Its collector records backend states and increments sample counts. Samples do not record every transition.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgrespro/pg_wait_sampling/blob/7e3a5fc937393596c0a51c5881dd63d7208408d1/README.md#L142-L144", "label": "pg_wait_sampling@v1.1.11 \u00b7 README.md:142-144"}, {"url": "https://github.com/postgrespro/pg_wait_sampling/blob/7e3a5fc937393596c0a51c5881dd63d7208408d1/collector.c#L169-L184", "label": "pg_wait_sampling@v1.1.11 \u00b7 collector.c:169-184"}, {"url": "https://github.com/postgrespro/pg_wait_sampling/blob/7e3a5fc937393596c0a51c5881dd63d7208408d1/collector.c#L195-L199", "label": "pg_wait_sampling@v1.1.11 \u00b7 collector.c:195-199"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F8", "claim": "\u2026synchronous_commit = off\u2026", "title": "synchronous_commit off trades commit durability for less waiting", "explanation": "synchronous_commit off permits ordinary commits without waiting for local WAL flush. A crash can lose recently acknowledged transactions. PostgreSQL retains database consistency.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3198-L3203", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:3198-3203"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L1498-L1502", "label": "REL_18_6 \u00b7 src/backend/access/transam/xact.c:1498-1502"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F9", "claim": "\u2026it holds the row locks on those 100 items until it finishes\u2026", "title": "Row locks persist until the transaction ends", "explanation": "PostgreSQL 18 releases row locks at transaction end or savepoint rollback. Separate autocommit transactions can shorten lock retention. Dividing one transaction into several statements alone does not release its row locks.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/mvcc.sgml#L1252-L1255", "label": "REL_18_6 \u00b7 doc/src/sgml/mvcc.sgml:1252-1255"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F10", "claim": "Latency is counted from each request's scheduled start, as pgbench does at a fixed rate.", "title": "Rate-limited pgbench includes schedule lag in latency", "explanation": "With throttling, pgbench measures transaction latency from scheduled start. Its reported latency includes time waiting for the previous transaction to finish.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pgbench.sgml#L658-L662", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pgbench.sgml:658-662"}]}, {"anchor": "F11", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F11", "claim": "\u20262 GiB shared_buffers\u2026", "title": "shared_buffers controls shared buffer memory", "explanation": "shared_buffers controls PostgreSQL shared buffer memory and takes effect at server start. A 2-GiB setting is within the supported range. It does not establish that the experiment eliminated physical reads.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2379-L2387", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:2379-2387"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L1735-L1746", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:1735-1746"}]}, {"anchor": "F12", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F12", "claim": "\u2026pg_stat_statements calls, total and mean time, blocks read; no wait breakdown\u2026", "title": "pg_stat_statements records statement totals without wait histories", "explanation": "pg_stat_statements records call counts and execution-time totals, means, minima, maxima, and variance. Its counters include blocks read. It does not record an ordered history of individual wait events.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/pg_stat_statements/pg_stat_statements.c#L1409-L1418", "label": "REL_18_6 \u00b7 contrib/pg_stat_statements/pg_stat_statements.c:1409-1418"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/pg_stat_statements/pg_stat_statements.c#L167-L169", "label": "REL_18_6 \u00b7 contrib/pg_stat_statements/pg_stat_statements.c:167-169"}]}, {"anchor": "F14", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F14", "claim": "\u2026or track_wal_io_timing for WAL\u2026", "title": "track_wal_io_timing controls WAL I/O timing", "explanation": "PostgreSQL 18 uses track_wal_io_timing when timing WAL synchronization. WAL durations appear under object wal in pg_stat_io and pg_stat_get_backend_io.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlog.c#L8763-L8767", "label": "REL_18_6 \u00b7 src/backend/access/transam/xlog.c:8763-8767"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L8787-L8793", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:8787-8793"}]}, {"anchor": "F15", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F15", "claim": "\u2026Azure Database for PostgreSQL query store\u2026", "title": "Query Store records sampled wait events", "explanation": "Query Store samples wait events through pgms_wait_sampling.history_period. Its documented default is 100 milliseconds.", "verdict": "Accurate", "sources": [{"url": "https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-query-store", "label": "https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-query-store"}]}, {"anchor": "F18", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F18", "claim": "\u2026a patch under review on pgsql-hackers, pg_wait_event_tracing\u2026", "title": "The wait-tracing patch remains under review", "explanation": "Patch 6984 remains Needs review in the November 2026 commitfest. The article correctly describes the patch as under review.", "verdict": "Accurate", "sources": [{"url": "https://commitfest.postgresql.org/patch/6984/", "label": "https://commitfest.postgresql.org/patch/6984/"}]}, {"anchor": "F19", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F19", "claim": "\u2026a release candidate since October 2026\u2026", "title": "PostgreSQL 19 reached release-candidate status in October 2026", "explanation": "The official documentation dates PostgreSQL 19 RC 1 to October 15, 2026. That supports the article's publication-day description.", "verdict": "Accurate", "sources": [{"url": "https://www.postgresql.org/docs/19/monitoring-stats.html", "label": "https://www.postgresql.org/docs/19/monitoring-stats.html"}]}, {"anchor": "F20", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F20", "claim": "\u2026WAL included from Postgres 18\u2026", "title": "PostgreSQL 18 added WAL activity to pg_stat_io", "explanation": "REL_18_6 doc/src/sgml/release-18.sgml:9839 records the addition of WAL activity to pg_stat_io. The article gives the correct major-version floor.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/release-18.sgml#L9839-L9839", "label": "REL_18_6 \u00b7 doc/src/sgml/release-18.sgml:9839-9839"}]}, {"anchor": "F22", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F22", "claim": "Its node times are elapsed time\u2026", "title": "EXPLAIN ANALYZE reports elapsed node time", "explanation": "REL_18_6 doc/src/sgml/ref/explain.sgml:84\u201385 specifies elapsed milliseconds within each plan node. These values include waits occurring inside the measured interval. They do not identify individual wait events.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/explain.sgml#L84-L85", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/explain.sgml:84-85"}]}, {"anchor": "F23", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F23", "claim": "\u2026heavyweight-lock waits that lasted longer than deadlock_timeout and were acquired\u2026", "title": "pg_stat_lock excludes short waits and unsuccessful acquisitions", "explanation": "PostgreSQL 19 documents pg_stat_lock counters for successful acquisitions after waiting longer than deadlock_timeout. The article states both restrictions.", "verdict": "Accurate", "sources": [{"url": "https://www.postgresql.org/docs/19/monitoring-stats.html", "label": "https://www.postgresql.org/docs/19/monitoring-stats.html"}]}, {"anchor": "F24", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F24", "claim": "\u2026gives up durability on a crash\u2026", "title": "synchronous_commit off can lose acknowledged transactions after a crash", "explanation": "REL_18_6 doc/src/sgml/config.sgml:3201 warns that recent acknowledged transactions can disappear after a crash. The article correctly states this tradeoff for synchronous_commit = off.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3201-L3201", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:3201-3201"}]}, {"anchor": "F25", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F25", "claim": "\u2026baseline 1.51 ms 3.08 ms 10.98 ms 26.7 ms 972\u2026", "title": "The original slow-request reduction rounds to 60%", "explanation": "Fix C removes 584 of 972 requests exceeding 5 milliseconds, or 60.1% (derived: (972 \u2212 388) / 972). The displayed p99.9 decreases 47.4%. The displayed maximum decreases 62.5%.", "verdict": "Accurate", "sources": []}, {"anchor": "F26", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F26", "claim": "\u2026by 100%, 92% and 27% in three repeats\u2026", "title": "The three repeat reductions match the filtered counts", "explanation": "The first pair removes 100% of 125 slow requests. The second removes 92% of 300 slow requests. The third removes 26.6% of 334 slow requests, which rounds to 27%.", "verdict": "Accurate", "sources": []}, {"anchor": "F27", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F27", "claim": "\u202630,000 flushes of 200 \u03bcs\u2026", "title": "Both flush distributions total 6 seconds", "explanation": "The uniform distribution totals 6 seconds across 30,000 flushes. The mixed distribution totals 6 seconds: 2.97 seconds plus 3.03 seconds. Both average 200 microseconds per flush.", "verdict": "Accurate", "sources": []}, {"anchor": "F28", "url": "https://pgtrue.postgres.ai/shared/brief/22c04666-2b3e-46e2-8d9d-c19e197ffece#F28", "claim": "Twenty of them in an hour are 40 ms out of 3,600 seconds\u2026", "title": "The short-wait example yields 4 expected samples", "explanation": "Twenty 2-millisecond waits total 40 milliseconds per hour. A 10-millisecond sampler takes 360,000 samples per hour. Uniformly distributed wait phases yield 4 expected hits (derived: 40 milliseconds / 10 milliseconds).", "verdict": "Accurate", "sources": []}]}