Re: Apply worker can pick an invalid index for REPLICA IDENTITY FULL lookups - Mailing list pgsql-hackers

From Ajin Cherian
Subject Re: Apply worker can pick an invalid index for REPLICA IDENTITY FULL lookups
Date
Msg-id CAFPTHDac6x9nU8fKq3tKD+84Nr09xFE+-ioxTn4_aHy+1OQDsA@mail.gmail.com
Whole thread
In response to Apply worker can pick an invalid index for REPLICA IDENTITY FULL lookups  (Mihail Nikalayeu <mihailnikalayeu@gmail.com>)
List pgsql-hackers
On Sun, Aug 23, 2026 at 5:56 AM Mihail Nikalayeu
<mihailnikalayeu@gmail.com> wrote:
>
> Hello,
>
> The fix and a reproducer are in the attachments.
>
> Affects 16 and up, from 89e46da5e51.
>

The patch looks good, just a small suggestion that the function header
of IsIndexUsableForReplicaIdentityFull() probably could do with a
comment so that future callers are aware of this potential shortfall.
Something like:

 * Note that this function does not check indisvalid.  Callers that are
 * selecting an index to use for future lookups must check indisvalid
 * themselves and reject invalid indexes

regards,
Ajin Cherian
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: scary patch contest
Next
From: Richard Guo
Date:
Subject: Re: scary patch contest