Re: Is this a problem in GenericXLogFinish()?

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Is this a problem in GenericXLogFinish()?
Дата
Msg-id CAA4eK1Li7jVwmjexcUz+doa=JSUdz9NmpJbZXT=o2qpyyy48yQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is this a problem in GenericXLogFinish()?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Is this a problem in GenericXLogFinish()?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, Oct 30, 2023 at 7:13 PM Robert Haas <robertmhaas@gmail.com> wrote:
>
> 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.
>

My understanding is the same. It is possible that my wording is not
clear. Let me try to clarify again, Michael asked: "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?" My reading of
his question was do we need a cleanup lock even if the primary bucket
and write bucket are the same which means the write bucket will be the
first page in the chain and we need a cleanup lock on it. I think the
second condition (no tuples) seems irrelevant here as whether that is
true or false we need a cleanup lock.

>
 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.
>

Sorry, I don't intend to say this.


--
With Regards,
Amit Kapila.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Add new option 'all' to pg_stat_reset_shared()
Следующее
От: "下雨天"
Дата:
Сообщение: fix 'ERROR: could not identify a comparison function for type iso-8859-1'