public inbox for [email protected]  
help / color / mirror / Atom feed
From: 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 08:09:42 +0200
Message-ID: <5990.1776751782@localhost> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<65564.1776696735@localhost>
	<[email protected]>

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.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com





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]
  Subject: Re: repack: fix a bug to reject deferrable primary key fallback for concurrent mode
  In-Reply-To: <5990.1776751782@localhost>

* 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