Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache

From: 邱宇航 <iamqyh(at)gmail(dot)com>
To: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache
Date: 2025-11-27 02:51:15
Message-ID: 188562F6-5BBB-49AB-B9E1-6312AE7970E8@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I do not think that will be a problem but I can change it if the
> general consensus is towards this way. Also, if we change this for
> pg_buffercache_mark_dirty_* functions, I think we need to apply the
> same for the pg_buffercache_evict_* functions.

After some testing, bgwriter/checkpointer didn' blocks the mark buffer
dirty SQL. it's ok to use LWLockAcquire.

There is an extra line break after elog(ERROR, "bad buffer ID: %d", buf)
which can be removed.

Best regards,
Yuhang Qiu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2025-11-27 02:53:20 Re: Consistently use palloc_object() and palloc_array()
Previous Message Fujii Masao 2025-11-27 02:46:10 Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect