Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache
Date
Msg-id aSfQx0GafuMwCRWD@paquier.xyz
Whole thread Raw
In response to Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache  (邱宇航 <iamqyh@gmail.com>)
List pgsql-hackers
On Thu, Nov 27, 2025 at 11:07:43AM +0800, 邱宇航 wrote:
> Yes, and we got another two loops in pg_buffercache_evict functions,
> and more loops in Drop/Flush relation/database buffers functions. Maybe
> we can abstract them into a generic loop function and it takes a buffer
> handler function pointer to avoid duplication?

I was considering an option when looking at the patch this morning,
but could not get behind it as it hides the internals of the routines
inside one extra layer of routines..  So what Nazir has done seems
like a balance good enough, at least for me.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Partial hash index is not used for implied qual.
Next
From: Michael Paquier
Date:
Subject: Move WAL/RMGR sequence code into its own file and header