From: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgBufferUsage.blk_{read|write}_time are zero although there are pgBufferUsage.local_blks_{read|written} |
Date: | 2023-10-16 10:07:07 |
Message-ID: | CAN55FZ12gGX0w9J6U8Vd62x-M314R6DtOv_=TR_TtJgwJ7OdvA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Tue, 10 Oct 2023 at 03:54, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> In ~14, as far as I can see blk_write_time is only incremented for
> shared buffers. FWIW, I agree that we should improve these stats for
> local buffers but I am not on board with a solution where we'd use the
> same counter for local and shared buffers while we've historically
> only counted the former, because that could confuse existing
> monitoring queries. It seems to me that the right solution is to do
> the same separation as temp blocks with two separate counters, without
> a backpatch. I'd like to go as far as renaming blk_read_time and
> blk_write_time to respectively shared_blk_read_time and
> shared_blk_write_time to know exactly what the type of block dealt
> with is when querying this data, particularly for pg_stat_statements's
> sake.
Yes, that could be a better solution. Also, having more detailed stats
for shared and local buffers is helpful. I updated patches in line
with that:
0001: Counts extends same way as a write.
0002: Rename blk_{read|write}_time as shared_blk_{read|write}_time.
0003: Add new local_blk_{read|write}_time variables.
Regards,
Nazir Bilal Yavuz
Microsoft
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Include-IOOp-IOOP_EXTENDs-while-calculating-block.patch | text/x-diff | 1.0 KB |
v3-0003-Add-local_blk_-read-write-_time-I-O-timing-statis.patch | text/x-diff | 22.2 KB |
v3-0002-Rename-I-O-timing-statistics-columns-to-shared_bl.patch | text/x-diff | 36.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Quan Zongliang | 2023-10-16 10:15:53 | PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[] |
Previous Message | Nikita Malakhov | 2023-10-16 09:59:01 | Re: remaining sql/json patches |