On Mon, Aug 24, 2026 at 9:23 PM Mihail Nikalayeu
<[email protected]> 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.

Attachment: add_comments_1.patch
Description: Binary data

Reply via email to