On Mon, Apr 28, 2025 at 2:43 PM Nazir Bilal Yavuz <byavu...@gmail.com> wrote:
>
> Hi,
>
> On Fri, 25 Apr 2025 at 19:17, Xuneng Zhou <xunengz...@gmail.com> wrote:
> >
> >
> > Would love to hear if this makes sense or or am I overlooking something 
> > here. Thanks for any feedback!
>
> I think what you said makes sense and is correct if we only want to
> simulate a buffer’s dirty state for testing/debugging, but if we want
> to replicate usual steps to marking buffers as dirty, then I think we
> need to have full-page WAL writes.
>

Fair enough. But you haven't mentioned how exactly you want to use
these functions for testing? That will help us to understand whether
we need to replicate all the steps to mark the buffer dirty.

Also, I feel it will be easier for one to test the functionality by
marking buffers dirty for a particular relation rather than by using
buffer_id but maybe I am missing the testing scenarios you have in
mind for the proposed APIs.

The other point to consider was whether we need to lock the relation
for the proposed functions. If we already mark buffers dirty by
scanning the buffer pool in bgwriter/checkpointer without acquiring a
lock on the relation, then why do we need it here?

-- 
With Regards,
Amit Kapila.


Reply via email to