public inbox for [email protected]  
help / color / mirror / Atom feed
From: Yuchen Li <[email protected]>
To: Antonin Houska <[email protected]>
To: Chao Li <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: Zhijie Hou (Fujitsu) <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Subject: Re: repack: fix a bug to reject deferrable primary key fallback for concurrent mode
Date: Tue, 21 Apr 2026 15:03:39 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <5990.1776751782@localhost>
References: <[email protected]>
	<65564.1776696735@localhost>
	<[email protected]>
	<5990.1776751782@localhost>

On 4/21/2026 2:09 PM, Antonin Houska wrote:
> Chao Li <[email protected]> wrote:
>
>>> On Apr 20, 2026, at 22:52, Antonin Houska <[email protected]> wrote:
>>>
>>> I'm just thinking if it's worth a separate error message.
>>> RelationGetIndexList() just ignores the deferrable PK
>>>
>>> if (replident == REPLICA_IDENTITY_DEFAULT && OidIsValid(pkeyIndex) && !pkdeferrable)
>>> relation->rd_replidindex = pkeyIndex;
>>>
>>> and if there's no other suitable index, the result is that there is no
>>> identity index for the table. So the change attached here should be consistent
>>> with this approach.
>> Thanks for your review. I guess you read the v1 patch. In v2, I have switched to use GetRelationIdentityOrPK() that Zhijie suggested, which has covered RelationGetIndexList() and all checks, so that code is simplified, and there is no longer a separate error message.
> Yes, this looks like the best approach. Sorry for missing v2.
>
The patch looks good to me. Using GetRelationIdentityOrPK() makes the 
check match the intended replica identity semantics more closely, and 
the added regression coverage looks useful.

Regards,
Yuchen Li






view thread (10+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: repack: fix a bug to reject deferrable primary key fallback for concurrent mode
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox