Re: Is this a problem in GenericXLogFinish()? - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Is this a problem in GenericXLogFinish()?
Date
Msg-id CAA4eK1+5jacq3g-fcVM2VTKt72SerQ5XuGV5rcrVNG1q7Shr+A@mail.gmail.com
Whole thread Raw
In response to Re: Is this a problem in GenericXLogFinish()?  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Is this a problem in GenericXLogFinish()?
Re: Is this a problem in GenericXLogFinish()?
List pgsql-hackers
On Fri, Oct 27, 2023 at 5:45 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Thu, Oct 26, 2023 at 09:40:09AM -0400, Robert Haas wrote:
> > Because of this, it is possible for bucketbuf, prevbuf, and wbuf to be
> > the same (your first scenario) but the second scenario you mention
> > (nextbuf  == wbuf) should be impossible.
>
> Okay..
>
> > It seems to me that maybe we shouldn't even be registering wbuf or
> > doing anything at all to it if there are no tuples that need moving.
> > That would also require some adjustment of the redo routine.
>
> Hmm.  So my question is: do we need the cleanup lock on the write
> buffer even if there are no tuples, and even if primary bucket and the
> write bucket are the same?
>

Yes, we need it to exclude any concurrent in-progress scans that could
return incorrect tuples during bucket squeeze operation.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Erki Eessaar
Date:
Subject: Issues with Information_schema.views
Next
From: jian he
Date:
Subject: Re: Issues with Information_schema.views