Hi,

On Sat, 14 Nov 2026 at 06:02, Michael Paquier <[email protected]> wrote:
>
> Hi all,
>
> Some of the feedback I got after f24a08ec13eb involved the fact that
> indexes could also be dropped during the phase 1 of REINDEX
> CONCURRENTLY when the expressions or predicates are evaluated.  The
> damage is limited to cache lookup failures or assertion hits during
> phase 2, thanks to the protections that f24a08ec13eb has added.

Yea, I can see both here without the fix. Your test fails with "could not
open relation with OID", and doing a REINDEX on the _ccnew index from the
function hits the ii_ReadyForInserts assert.

> Anyway, it would be nice to fix this issue.  Attached is a patch
> addressing the problem with a test, for a backpatch down to v15.
>
> Thoughts or objections?

The patch looks good to me, some minor comment nits:

- "then close relations" in the lockrelid comment isn't true anymore, and
  parentRelationIds there is heapRelationIds now?

- IIUC ReindexUnpinRelations() isn't only closing relations from
  ReindexPinRelations() anymore too..

Regards,
Ayush


Reply via email to