Re: BUG #17268: Possible corruption in toast index after reindex index concurrently

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #17268: Possible corruption in toast index after reindex index concurrently
Дата
Msg-id B706E617-2172-4460-845A-B76E5DB2E0A2@anarazel.de
обсуждение исходный текст
Ответ на Re: BUG #17268: Possible corruption in toast index after reindex index concurrently  (Noah Misch <noah@leadboat.com>)
Ответы Re: BUG #17268: Possible corruption in toast index after reindex index concurrently  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
Hi,

On November 8, 2021 7:56:24 PM PST, Noah Misch <noah@leadboat.com> wrote:
>On Mon, Nov 08, 2021 at 12:36:41PM -0800, Andres Freund wrote:
>> One possible way to fix this would be to make ReindexRelationConcurrently()
>> acquire a lock on the underlying table when reindexing a toast table. Another
>> to not release the lock in toast_save_datum().
>
>The latter is more future-proof.  Does it have material disadvantages?

I don't immediately see any. But I've been long of the opinion, and had plenty discussions around it, that our habit of
releasinglocks early is far too widely used. 

I do however wonder if there's other path to the problem, besides saving toast datums. We also release those locks
earlyin other places, and while e.g. r/o locks won't cause a problem with this specific interlock, it could cause
problemaround dropping the relation, for example. 

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.



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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: BUG #17268: Possible corruption in toast index after reindex index concurrently
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17276: pg_tblspc Permission denied