Re: Apply worker can pick an invalid index for REPLICA IDENTITY FULL lookups

Поиск
Список
Период
Сортировка
Искать

Re: Apply worker can pick an invalid index for REPLICA IDENTITY FULL lookups

От:
Amit Kapila <amit.kapila16@gmail.com>
Дата:
Вложения:
On Mon, Aug 24, 2026 at 9:23 PM Mihail Nikalayeu
 wrote:
>
> >  Any thoughts on moving the 'idxRel->rd_index->indisvalid' check into 'IsIndexUsableForReplicaIdentityFull()' itself?
>
> I initially thought about that approach too, but an assertion also
> uses that check.
> This is explained in the commit message:
>
> > Skip invalid indexes, as the planner does.  The test belongs here rather
> > than in IsIndexUsableForReplicaIdentityFull(), whose other caller is an
> > assertion that would then trip over an index DROP INDEX CONCURRENTLY has
> > just invalidated but that still finds tuples fine.
>

I think it is better to add some comments in the code as well. See
attached. I have added # in the test comments to make it similar to
the previous test. Otherwise, the patch LGTM.

-- 
With Regards,
Amit Kapila.
FAQ