Re: BUG #17401: REINDEX TABLE CONCURRENTLY creates a race condition on a streaming replica
От | Andrey Borodin |
---|---|
Тема | Re: BUG #17401: REINDEX TABLE CONCURRENTLY creates a race condition on a streaming replica |
Дата | |
Msg-id | 29311A7B-240A-451A-9DC8-4909A0FEAE12@yandex-team.ru обсуждение исходный текст |
Ответ на | Re: BUG #17401: REINDEX TABLE CONCURRENTLY creates a race condition on a streaming replica (Andrey Borodin <x4mmm@yandex-team.ru>) |
Ответы |
Re: BUG #17401: REINDEX TABLE CONCURRENTLY creates a race condition on a streaming replica
|
Список | pgsql-bugs |
> On 12 Feb 2022, at 20:03, Andrey Borodin <x4mmm@yandex-team.ru> wrote: > > Thank you for the explanation! > FWIW here’s more clean TAP-test reproduction. Sometimes I see > 2022-02-12 21:59:02.786 +05 [19629] 004_cic_standby.pl ERROR: could not open relation with OID 16401 > 2022-02-12 21:59:02.786 +05 [19629] 004_cic_standby.pl STATEMENT: SELECT bt_index_check('idx',true); > > In tmp_check/log/004_cic_standby_standby_1.log after running amcheck tests. Exactly as per initial report. I tried to dig into this again. And once again I simply cannot understand how it is supposed to work... I'd appreciate if someone explained it to me. When I do SELECT bt_index_check('idx',true) in fact I'm doing following: 1. regclassin() lookups 'idx', converts it into oid without taking any lock 2. bt_index_check() gets this oid and lookups index again. Do we rely on catalog snapshot here? Or how do we know that this oid is still of the index named 'idx' on standby? When backendwill understand that this oid is no more of the interest and get an error somehow? I think it must happen during index_open(). BTW is anyone working on this bug? Best regards, Andrey Borodin.
В списке pgsql-bugs по дате отправления: