Re: Non-deterministic buffer counts reported in execution with EXPLAIN ANALYZE BUFFERS

Поиск
Список
Период
Сортировка
От Lukas Fittl
Тема Re: Non-deterministic buffer counts reported in execution with EXPLAIN ANALYZE BUFFERS
Дата
Msg-id CAP53PkxOX5ZBO76moCW=CykiwBhJSewq2UnQrLgrGwJg=Kaimg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Non-deterministic buffer counts reported in execution with EXPLAIN ANALYZE BUFFERS  (Tomas Vondra <tomas@vondra.me>)
Список pgsql-hackers
On Tue, Feb 3, 2026 at 3:02 AM Tomas Vondra <tomas@vondra.me> wrote:
> Perhaps we could identify buffer accesses from syscache lookups, and
> track those separately? Then we'd know which of the hits/reads are from
> "actual" execution.

Doing this in the current infrastructure (with the global
pgBufferUsage counters) is pretty expensive I think, since we'd need
to do an extra call to BufferUsageAccumDiff after syscache lookups, to
get the buffer usage just for that activity.

If splitting out buffers by syscache vs others is of interest, I would
welcome review of the stack-based instrumentation patch over at [0],
which has an example of how it can be used to more easily break Index
Scans out into index and table access - the same logic could be
applied to syscache lookups I think.

[0]:
https://www.postgresql.org/message-id/flat/CAP53Pkw85U-aMRzkZ%2BkRKfCh0pA5vyo%3D_W16gPK4sirZxiJy%3DA%40mail.gmail.com#170c740dbeb87d25d3f921ab28e4bb40

Thanks,
Lukas

--
Lukas Fittl



В списке pgsql-hackers по дате отправления: