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.94.2) (envelope-from ) id 1uBDAT-007yT9-MZ for pgsql-bugs@arkaria.postgresql.org; Sat, 03 May 2025 13:44:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uBD9S-00Er0K-6X for pgsql-bugs@arkaria.postgresql.org; Sat, 03 May 2025 13:43:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uBCcW-00Enho-B3 for pgsql-bugs@lists.postgresql.org; Sat, 03 May 2025 13:09:33 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uBCcU-000s8m-0I for pgsql-bugs@lists.postgresql.org; Sat, 03 May 2025 13:09:33 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 83FB51380061; Sat, 3 May 2025 09:09:27 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sat, 03 May 2025 09:09:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1746277767; x= 1746364167; bh=kUdgwX2rQyEzUkwkDn4euUvL/sLQTNqUz1tdGfZG0go=; b=D ZY4ScboMa8s8KSrt+BPLnC0iDtdH0NrG043mPgKk8AiJZjhzeu8CPFLgs10j3VWI GT8lb/aU3CwKnbUaIepQNHYLO3/K4pEn7qvmUjPsn99NZdJv7/C/1SorFFSSwrTh 13EpH4cr8ioSTa1kVbXlqMEynj+eMYC/i2KeI+u30ZFaWordoVMk7hJjru6A1fe5 4vjLCd9Ytb+dqDLuxqrBWcOyVAZW67EyDxGbFwBuVPyB41ehbmCtbDJlmekcMDlF qK+WkQSnx9I3K68X7fxmTnZWxWU4BbLNkDEd7teGHFldUt0+mm2vgaXVOYA/oHW3 oTtPUTETwsjPbnyZH9+gQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1746277767; x=1746364167; bh=k UdgwX2rQyEzUkwkDn4euUvL/sLQTNqUz1tdGfZG0go=; b=Okb+sbsW/6oyhsmw/ 13VC90RggRytOmivsQsjMA+AqcabTQVPYm8ceaGzuME5Bndp5mi95Oq8b/OY1KCe Hng2XkFTYAapKKvgLrx/zStZnt7/19AQywWfI2e9PUS40xjkSScYiWaxNsnXmzwS fS9YrQaY0oNYpJdm9M75CXW07FrxbW47KDqGGRmvx5RjE1gVwTGp/qSJdeg3shRk IjfYeuFBFUQ6MZHQzl5pxjLLPUO+NLEohJzGpoyBqGxGYwboXmyOUUk8FTUpzv5+ pG8pqCF7KLbtziocshygZLvxMGWS7q2kVFN07exOcXMkQGXcL4IDhS/bPB8bXneH M+p1g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeehgeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddt jeenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuh hrihhlvghmuhdruggvqeenucggtffrrghtthgvrhhnpeeiheehkeekleegueeifedvffeg tddugeffheehfeeftdduhfdtkeefleelkeffjeenucffohhmrghinhepvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtth hopeekpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjghgurhesuggrlhhisgho rdgtohhmpdhrtghpthhtohepmhihohhnseguvggsihgrnhdrohhrghdprhgtphhtthhope hfrghsthgtrghtsehgmhgrihhlrdgtohhmpdhrtghpthhtoheplhhutggrrdhvrghllhhi shgrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhnughrfigrnhhgsehgmhgrihhlrd gtohhmpdhrtghpthhtohepghhuihhllhgruhhmvgeslhgvlhgrrhhgvgdrihhnfhhopdhr tghpthhtohepphhgshhqlhdqsghughhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdroh hrghdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdr ohhrgh X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 3 May 2025 09:09:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1746277763; bh=PdMdAu9nQa2NLn5edZYifBNra1M3fMDFCp7rD7+V9Fc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=69VK4pl+t12Livf2W5mIqnFBF40E9sWt9We52vAxFUUOT3PwLAz28m2TWL+d47GwB 8FR+q4LB8+AvCDw85q1WzinzdAtnrvPWGnqxSjQTjKFsAG38DwKtEoCv9oArTDM1a/ 5MprqJ3MM85zklfiw1DMR1B0xPM/qiZ1IkrNA/g38z7lmCfTDpJD8iAa/sRLCshc3G EcOHHAjHj/bOESNomEbnY5nrtnv2j6jr/ht/Kx2Mgzby5rpKGbYli8H5zk/VA4mFk4 CK6uU6VEeuoO9I/DYrvPEIAQCDFuvGlyx40dSWtJKbq3cgKyEU69vbPrbvU4QqYkYK g60TkEDL/RTwg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id C7F1F90; Sat, 3 May 2025 15:09:23 +0200 (CEST) Date: Sat, 3 May 2025 15:09:23 +0200 From: Alvaro Herrera To: Tender Wang Cc: Jehan-Guillaume de Rorthais , fastcat@gmail.com, pgsql-bugs@lists.postgresql.org, Christoph Berg , PostgreSQL Developers , Guillaume Lelarge , Luca Vallisa Subject: Re: Issue attaching a table to a partitioned table with an auto-referenced foreign key Message-ID: <202505031309.f3pavc23a5b3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-May-01, Tender Wang wrote: > Hmm. I didn't get the same conclusion. > Before commit 5914a22f6ea5, the issue reported by Luca could have happened. [...] > You can see from the above test that no error was reported. > But if I revert the commit 614a406b4ff1, above test would report error on > v16devel: Yeah, I was mistaken to blame 5914a22f6ea5 for this issue when the real culprit was 614a406b4ff1. Anyway, I pushed the proposed fix to all branches last night, so hopefully it works correctly for all cases now. (As context -- it took me several weeks or months to get FKs on partitioned tables to work. People would make fun at the "spider" diagrams I drew on whiteboards, of the relationships between pg_constraint and pg_trigger entries. And for some reason at no point did the idea of self-referencing FKs occurred to me. I should have realized that the complexity was getting out of hand! At the very least I should have pressed for some more QA help.) Y'all are still on time to test this a bit more before next week's releases ... if I have made things even worse I can still revert the patch. With luck, that won't be necessary. Regards -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Java is clearly an example of money oriented programming" (A. Stepanov)