Re: pgBufferUsage.blk_{read|write}_time are zero although there are pgBufferUsage.local_blks_{read|written}
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>, Nazir Bilal Yavuz <byavuz81@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-10-19T02:25:13Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix description of I/O timing info for shared buffers in EXPLAIN (BUFFERS)
- 8dd70828b460 15.6 landed
- db69101a1d00 16.2 landed
-
pg_stat_statements: Add local_blk_{read|write}_time
- 5147ab1dd34a 17.0 landed
-
Add local_blk_{read|write}_time I/O timing statistics for local blocks
- 295c36c0c1fa 17.0 landed
-
Rename I/O timing statistics columns to shared_blk_{read|write}_time
- 13d00729d422 17.0 landed
-
Count write times when extending relation files for shared buffers
- 2308f18c0733 16.1 landed
- d17ffc734dad 17.0 landed
-
Add JIT deform_counter
- 5a3423ad8ee1 17.0 cited
On Tue, Oct 03, 2023 at 12:44:36PM -0400, Robert Haas wrote:
> My first thought was to wonder whether this was even a bug. I
> remembered that EXPLAIN treats shared, local, and temp buffers as
> three separate categories of things. But it seems that someone decided
> to conflate two of them for I/O timing purposes:
>
> if (has_timing)
> {
> appendStringInfoString(es->str, "
> shared/local");
>
> ^^^^ Notice this bit in particular.
I was reviewing the whole, and this is an oversight specific to
efb0ef909f60, because we've never incremented the write/read counters
for local buffers, even with this commit applied, for both the EXPLAIN
reports and anything stored in pg_stat_statement. It seems to me that
the origin of the confusion comes down to pg_stat_database where
blk_{read|write}_time increments on both local and shared blocks, but
on EXPLAIN this stuff only reflects data about shared buffers. So the
"shared" part of the string is right, but the "local" part is not in
v15 and v16.
--
Michael