Re: Add shared buffer hits to pg_stat_io

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Re: Add shared buffer hits to pg_stat_io
Дата
Msg-id CAAKRu_ZBauWVzOGkjsM3dwLv5WQLfQA=Ht5=_raaBZ9kaaSPJw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add shared buffer hits to pg_stat_io  (Andres Freund <andres@anarazel.de>)
Ответы Re: Add shared buffer hits to pg_stat_io  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Tue, Mar 7, 2023 at 2:47 PM Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> LGTM. The only comment I have is that a small test wouldn't hurt... Compared
> to the other things it should be fairly easy...

So, I have attached an updated patchset which adds a test for hits. Since
there is only one call site where we count hits, I think this single
test is sufficient to protect against regressions.

However, I am concerned that, while unlikely, this could be flakey.
Something could happen to force all of those blocks out of shared
buffers (even though they were just read in) before we hit them.

We could simply check if hits are greater at the end of all of the
pg_stat_io tests than at the beginning and rely on the fact that it is
highly unlikely that every single buffer access will be a miss for all
of the tests. However, is it not technically also possible to have zero
hits?

- Melanie

Вложения

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Add standard collation UNICODE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: proposal - get_extension_version function