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

From Robert Haas
Subject Re: Is this a problem in GenericXLogFinish()?
Date
Msg-id CA+TgmobnfQ_JVSHY5Er3U2k9Uq-gr=XCoi_mbQuWCp=5Bhd-WQ@mail.gmail.com
Whole thread Raw
In response to Re: Is this a problem in GenericXLogFinish()?  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Is this a problem in GenericXLogFinish()?
List pgsql-hackers
On Sat, Oct 28, 2023 at 6:15 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> > 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.

Amit, thanks for weighing in, but I'm not convinced. I thought we only
ever used a cleanup lock on the main bucket page to guard against
concurrent scans. Here you seem to be saying that we need a cleanup
lock on some page that may be an overflow page somewhere in the middle
of the chain, and that doesn't seem right to me.

So ... are you sure? If yes, can you provide any more detailed justification?

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: POC, WIP: OR-clause support for indexes
Next
From: Aleksander Alekseev
Date:
Subject: Re: Explicitly skip TAP tests under Meson if disabled