Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions
Date
Msg-id u5agveyktsgyi3eutjte4rzopjpm5ajfvr5x53k55o5ypjcjrq@kpn67c4fck6g
Whole thread Raw
In response to Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
Hi,

On 2025-04-10 13:50:36 +0000, Bertrand Drouvot wrote:
> Thanks for the patch! That sounds like a great addition. I was doing some
> tests and did not see any issues. Also while doing the tests I thouhgt that it
> could be useful to evict only from a subset of NUMA nodes (now that NUMA
> awareness is in). We'd need to figure out what to do for buffers that are spread
> across NUMA nodes though.
>
> Does that sound like an idea worth to spend time on? (If so, I'd be happy to work
> on it).

I'm not sure that's common enough to warrant its own function. You can do that
with pg_buffercache_evict(), it'll be slower than pg_buffercache_evict_all(),
but given that determining the numa node already is somewhat expensive, I'm
not sure it's going to make that big a difference.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: "YeXiu"
Date:
Subject: Re: Feature Recommendations for Logical Subscriptions
Next
From: Fujii Masao
Date:
Subject: Re: Correct documentation for protocol version