Re: PATCH: Add REINDEX tag to event triggers

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: PATCH: Add REINDEX tag to event triggers
Дата
Msg-id b95c51d5-6089-f8ee-dcfc-94b620b21ff3@gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: Add REINDEX tag to event triggers  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: PATCH: Add REINDEX tag to event triggers  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi Michael,

05.12.2023 02:45, Michael Paquier wrote:
> Popping a snapshot at this stage when there are no indexes has been a
> decision taken by the original commit in 5dc92b844e68 because we had
> no need for it yet, but we may do now depending on the function
> triggered.  I have been looking at the whole stack and something like
> the attached to make a pop conditional seems to be sufficient to
> satisfy all the cases I've been able to come up with, including the
> one reported here.
>
> Alexander, do you see any hole in that?  Perhaps the snapshot push
> should be more aggressive at the end of ReindexRelationConcurrently()
> as well (in the last transaction when rebuilds happen)?

Thank you for the fix proposed!

I agree with it. I had worried a bit about ReindexRelationConcurrently()
becoming twofold for callers (it can leave the snapshot or pop it), but I
couldn't find a way to hide this twofoldness inside without adding more
complexity. On the other hand, ReindexRelationConcurrently() now satisfies
EnsurePortalSnapshotExists() in all cases.

Best regards,
Alexander



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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: Oversight in reparameterize_path_by_child leading to executor crash
Следующее
От: Junwang Zhao
Дата:
Сообщение: Re: Make COPY format extendable: Extract COPY TO format implementations