Re: Add shared buffer hits to pg_stat_io - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: Add shared buffer hits to pg_stat_io
Date
Msg-id CAAKRu_buzeWbu2oL-ntmnKrKd+B=XHYYqMVQc4Ksji7=-+EZRQ@mail.gmail.com
Whole thread Raw
In response to Re: Add shared buffer hits to pg_stat_io  (Andres Freund <andres@anarazel.de>)
Responses Re: Add shared buffer hits to pg_stat_io  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Re: Add shared buffer hits to pg_stat_io  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Wed, Mar 8, 2023 at 2:23 PM Andres Freund <andres@anarazel.de> wrote:
>
> On 2023-03-08 13:44:32 -0500, Melanie Plageman wrote:
> > 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.
>
> You could make the test query a simple nested loop self-join, that'll prevent
> the page being evicted, because it'll still be pinned on the outer side, while
> generating hits on the inner side.

Good idea. v3 attached.

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Should vacuum process config file reload more often
Next
From: Andrew Dunstan
Date:
Subject: Re: buildfarm + meson