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

From: Miłosz Bieniek <bieniek(dot)milosz(at)proton(dot)me>
To: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, onderkalaci(at)gmail(dot)com
Subject: Re: Apply worker can pick an invalid index for REPLICA IDENTITY FULL lookups
Date: 2026-08-24 18:26:01
Message-ID: hk0VDsTA5u9qpkWkHFRYqsbvbHElAFvnYiCHLkP_jfzn8qtPmVREsLTaV2HeJ0TX935yz3nTVlat-FkZi3TlLjwVtawbGFwN4BSfYNBFzT0=@proton.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

Oh sorry, I didn't notice it. Make sense.

I was wondering if there is a way (and whether it even makes sens
to make this test fail faster?
Right now, if we remove `idxRel->rd_index->indisvalid &&` the test
just hangs until the overall timeout is hit and we're not getting
any meaningful message.

Kind regards,
Miłosz Bieniek

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2026-08-24 18:32:00 Re: Switching XLog source from archive to streaming when primary available
Previous Message Bharath Rupireddy 2026-08-24 18:05:00 Re: Assertion failure in GetSubscriptionRelations() with concurrent DROP TABLE