Re: EXPLAIN: showing ReadStream / prefetch stats
Tomas Vondra <tomas@vondra.me>
From: Tomas Vondra <tomas@vondra.me>
To: Lukas Fittl <lukas@fittl.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>,
Andres Freund <andres@anarazel.de>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-07T12:36:01Z
Lists: pgsql-hackers
Attachments
- v13-0001-Switch-EXPLAIN-to-unaligned-output-for-json-xml-.patch (text/x-patch) patch v13-0001
- v13-0002-Add-EXPLAIN-IO-infrastructure-with-BitmapHeapSca.patch (text/x-patch) patch v13-0002
- v13-0003-auto_explain-Add-new-GUC-auto_explain.log_io.patch (text/x-patch) patch v13-0003
- v13-0004-Add-EXPLAIN-IO-instrumentation-for-SeqScan.patch (text/x-patch) patch v13-0004
- v13-0005-Add-EXPLAIN-IO-instrumentation-for-TidRangeScan.patch (text/x-patch) patch v13-0005
Hi, I've pushed the first two parts earlier today. Here's a v13 with the remaining pieces rebased on top of that, with updated commit messages and some additional fixes. 1) There was a bogus else-if in explain.c that would make it impossible to enable "wal" and "io" at the same time. 2) Replaced one of the "typedef IOStats" with just forward declaration, to prevent possible conflicting typedefs in the future (even if that wasn't an issue now). 3) Used (es_instrument & INSTRUMENT_IO) more consistently. A couple places in the executor still checked just es_instrument, and so would collect stats even if not needed. Be consistent. 4) Various comment additions / improvements. I intend to push this later today, after giving it one more round of review etc. regards -- Tomas Vondra
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
bufmgr: Return whether WaitReadBuffers() needed to wait
- 513374a47a71 19 (unreleased) landed