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

From Andres Freund
Subject Re: Add shared buffer hits to pg_stat_io
Date
Msg-id 20230308192342.fpbnsofdl2kxb23f@awork3.anarazel.de
Whole thread Raw
In response to Re: Add shared buffer hits to pg_stat_io  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: Add shared buffer hits to pg_stat_io
List pgsql-hackers
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.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: buildfarm + meson
Next
From: Jacob Champion
Date:
Subject: Re: postgres_fdw, dblink, and CREATE SUBSCRIPTION security