Re: BUG #17949: Adding an index introduces serialisation anomalies.

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: BUG #17949: Adding an index introduces serialisation anomalies.
Дата
Msg-id CA+hUKGKmrBFy-Z7XTHv6o5EV7WEhoscyTqyf=LTBeGjNoYnOkA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17949: Adding an index introduces serialisation anomalies.  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: BUG #17949: Adding an index introduces serialisation anomalies.  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-bugs
On Mon, Jun 26, 2023 at 8:04 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> Yes, +1 on the patches. Any chance of constructing test cases for these?

Thanks for looking.  I can't think of any good way to test
deterministically.  All three depend on unlucky scheduling.  Perhaps
if we had one of those 'pause insertion' systems that I have heard
talk of.

> >               /*
> > -              * We only get here if the index is completely empty. Lock relation
> > -              * because nothing finer to lock exists.
> > +              * Since we have no pages locked, it's possible for another
> > +              * transaction to insert data between _bt_search() and
> > +              * PredicateLockRelation().  We have to try again after taking a
> > +              * relation-level predicate lock, to close a narrow window where we
> > +              * wouldn't scan concurrently inserted tuples, but the writer wouldn't
> > +              * see our predicate lock.
> >                */
>
> I'd like to keep the old comment here, it's good context, and add the
> new text in addition to the old.

Done.

> v3-0002-Fix-race-in-SSI-interaction-with-bitmap-heap-scan.patch: Can we
> keep the optimization when not using SSI?

Done.

I'll push these in a couple of days if there are no further comments.

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index