Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wF4Iu-004iNv-2o for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Apr 2026 06:09:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wF4Iu-006eUf-0L for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Apr 2026 06:09:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wF4It-006eUU-2W for pgsql-hackers@lists.postgresql.org; Tue, 21 Apr 2026 06:09:47 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wF4Ir-000000022VB-1rjo for pgsql-hackers@postgresql.org; Tue, 21 Apr 2026 06:09:46 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4891f625344so17897785e9.0 for ; Mon, 20 Apr 2026 23:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1776751784; x=1777356584; darn=postgresql.org; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=2Rv35U7L4yMcuza3FLamhEhO2XzkzCeoH0o8hs+ZlBI=; b=m+WzCYyM65r2p37GBuwP8ryiK88RXcQsgYQt4HRQeAQTLbghgx45kTaia1sWLME9pV zILmf3kiRtLcAhM4dlXTaHCvIQUk+2Sw2NghSKd95hftW6eswhhAuU2wuMwjggiNClUM uMUdgEyCBw/0dOi+YpXJ3whQmNxW+1xk8k4wrMisXQkYXXuomJBYiImYZcIyHqH+REUz HWdh0qHuGNUIg6hkXjkqU69tUPy+pyiuFH4gE8fBD7l5EiW7Vb1WMiwNzRZYDxi7dEVn 2kztMUo6Pbor9RhCWK1pRwTUdDGsWNjxNoJY8lUbaMH6bJqXpzQVnlkkc/s4omTdscBZ 692w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776751784; x=1777356584; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2Rv35U7L4yMcuza3FLamhEhO2XzkzCeoH0o8hs+ZlBI=; b=dgajH1ihBQ91mgi3lwMr3TWf8Fu91s1ZsgFgH7u3YxUAgzI9ednMOm2paltlVP67As sfxmFJEmf3NaSZPWQrwSkbZxUEK9K7FNVHmMSndbxrxTwDvXfYlnn4gCctsM54w8R+hT Jps4uBQA9Yi1NWSqv0MqCqAaMG25oWlZpDRc6/09xgyCM6OW2M60AD7VMh/aGcy84Bo7 AgCVAr+Uf5oZnx5mbnj6/IaSKny2GrTG9l0oHwOy3kSXJHgT1ZaQVfuO27PdA/ICBaVR bLHEEJOAS9TYgoXdnvQnZb6NJlSnRRvteDdYMUp8PiOdQlGdJ3U7MEsHkwE6v0/99Nc7 26DQ== X-Gm-Message-State: AOJu0YzDHKAyIBjxuZr7FpOzfBUVwMWl1ZRZl4JbuBgGwvxP+KHZU0T6 St9h4clQLvz+mWRfkwQe4mHonjIYQXi7XIBfmZ+mUEFmPMWC3+Q9oen0dE6srXenVNQ= X-Gm-Gg: AeBDiet+xSmNLtPNLx3F7waVI081kcuvq9BOnfQ3MQJJE+S6WgiSGVZWr/9xdMJyqK2 BNe89fwoBDL9vSkul1o41+/Uvb776V4kjrqIaS0LFEPxHDw+mSNbJ/ymohpp0s4Kly/awnwJL4u Qm1QbdC2a2NVcARa/pep8ddY+z8jmB0Imy3KltUt9BhRSoI4iAGauAXuEfs1fodn9BBjiOuNqeg jz0t8Jamdyx3lfYQofHpDW+vrQRCUt+NwSC6CUG4w3juXlrRbrCBR9sQPKpZ+wjU5qrivKGzg/2 eNxoQ9kA/RJldNr11FSfUo0n0QX4Qhy22Azf86QpYbf/1jsrxr+edQMLd59eXVXrAiGBVrtNECU MqYUeS+lv/AV2l0PVs4etzt3gL7JywN0msF8Oo74bVYA/FT0WPH7bvS65Wt1lUwFru8VLV7zzDS JlIttuoX+AncVfwPtUfzd0wf2lYOOhD/bOmJavpLvK5tqHxoc= X-Received: by 2002:a05:600c:1d05:b0:489:1baf:8c03 with SMTP id 5b1f17b1804b1-4891baf8d2cmr97212415e9.11.1776751784186; Mon, 20 Apr 2026 23:09:44 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a5499b0edsm40704315e9.14.2026.04.20.23.09.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2026 23:09:43 -0700 (PDT) From: Antonin Houska To: Chao Li cc: PostgreSQL-development , "Zhijie Hou (Fujitsu)" , Alvaro Herrera Subject: Re: repack: fix a bug to reject deferrable primary key fallback for concurrent mode In-reply-to: <48844EC6-0909-41E6-B2C4-F3BF8A2B1AA8@gmail.com> References: <10DD5E13-B45D-44F1-BE08-C63E00ABCAC0@gmail.com> <65564.1776696735@localhost> <48844EC6-0909-41E6-B2C4-F3BF8A2B1AA8@gmail.com> Comments: In-reply-to Chao Li message dated "Tue, 21 Apr 2026 10:38:05 +0800." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5989.1776751782.1@localhost> Content-Transfer-Encoding: quoted-printable Date: Tue, 21 Apr 2026 08:09:42 +0200 Message-ID: <5990.1776751782@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Chao Li wrote: > > On Apr 20, 2026, at 22:52, Antonin Houska wrote: > > = > > I'm just thinking if it's worth a separate error message. > > RelationGetIndexList() just ignores the deferrable PK > > = > > if (replident =3D=3D REPLICA_IDENTITY_DEFAULT && OidIsValid(pkeyIndex)= && !pkdeferrable) > > relation->rd_replidindex =3D 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 co= nsistent > > with this approach. > Thanks for your review. I guess you read the v1 patch. In v2, I have swi= tched to use GetRelationIdentityOrPK() that Zhijie suggested, which has co= vered RelationGetIndexList() and all checks, so that code is simplified, a= nd 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