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 12:53:50
Message-ID: pOgLiz9X0MzmdfOoow5M-J8Y43PnUK405e88aMSeKQ3T_ZLhl2wxil4_E4WXoqaN1aZQI5OAiZhXSeL8ILwP6nn9RWRnysCuGrw71ZLQpXk=@proton.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Mikhail

Any thoughts on moving the 'idxRel->rd_index->indisvalid' check into 'IsIndexUsableForReplicaIdentityFull()' itself?
As I understand it, an index MUST be valid to be usable for REPLICA IDENTITY FULL lookups, so it seems more natural to have that check live alongside the other usability checks in `IsIndexUsableForReplicaIdentityFull()`, rather than in the caller.

Kind regards,
Miłosz Bieniek

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-08-24 13:04:19 Re: pgstat: Flush some statistics within running transactions, take 2
Previous Message Andres Freund 2026-08-24 12:42:59 Re: How to best find unexpected WARNINGs in the TAP tests?