Re: BUG #18499: Reindexing spgist index concurrently triggers Assert("TransactionIdIsValid(state->myXid)")

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #18499: Reindexing spgist index concurrently triggers Assert("TransactionIdIsValid(state->myXid)")
Дата
Msg-id Zm90GkbGq16gjJy0@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #18499: Reindexing spgist index concurrently triggers Assert("TransactionIdIsValid(state->myXid)")  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #18499: Reindexing spgist index concurrently triggers Assert("TransactionIdIsValid(state->myXid)")  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sun, Jun 16, 2024 at 06:52:52PM -0400, Tom Lane wrote:
> BTW, a different line of attack could be to not generate redirects
> at all during REINDEX CONCURRENTLY: on the basis of this argument,
> we don't need them.  So that would look roughly similar to the tests
> that skip making redirects when isBuild is true, and it'd allow
> keeping the assertion in spgFormDeadTuple, and it'd save some
> usually-trifling amount of work in the next VACUUM.  However, I'm
> not sure there's a nice way for spginsert() to know whether it's
> being invoked in REINDEX CONCURRENTLY or a normal INSERT/UPDATE
> query.  Can we trust indexInfo->ii_Concurrent for that?

I am not sure to understand the redirection part for spgist, but
except if I am missing something, we already rely on ii_Concurrent for
other index AMs like BRIN paths to check if we are dealing with a
concurrent build path or not.  index_concurrently_build() is used
by both CIC and REINDEX CONCURRENTLY, where the flag is set after a
BuildIndexInfo().
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18499: Reindexing spgist index concurrently triggers Assert("TransactionIdIsValid(state->myXid)")
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: error "can only drop stats once" brings down database