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 1sSFWM-005cJc-Dm for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Jul 2024 12:37:06 +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 1sSFWK-0088fi-Vv for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Jul 2024 12:37:04 +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 1sSFWJ-0088fL-MF for pgsql-bugs@lists.postgresql.org; Fri, 12 Jul 2024 12:37:04 +0000 Received: from fout4-smtp.messagingengine.com ([103.168.172.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sSFWG-001m5D-Dd for pgsql-bugs@lists.postgresql.org; Fri, 12 Jul 2024 12:37:03 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 838EF138714D; Fri, 12 Jul 2024 08:36:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 12 Jul 2024 08:36:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1720787818; x=1720874218; bh=s DUZKg2n2X5fUKFFN5TDhwm5Mwx6I/SlyCr62F+u8i4=; b=Rhu0S6iyxn5gN/ZrL /dHjD521EUwiZ8xWV25NoslM5tXo7K4RthMBHEQl2GlGN6QMk80MMWAV7DLeqrB5 UNUFVMY7pl1aO7rBI6CflRYzeScGfLXvXAEPa6+b/qB7F26SgD5NBtPp/VddYl7z cKJz/gv59HXnYfFMEKrklialFu2UGBe6zmmZSC7+F+Q/mGlp+B/gjwC6NnVLrB1P djbxZtuDx2eLgoCtLz9eJB992MBmPA8WE2IHQSPLmWeuy1+b4i8JLul8fVC2gQRi +lf0lKfsVgAcYX8foc3YdDqAPoQ+NTEC7+BUWqa4yvrVVjQ3fFd+OffuLwiHQTKe U6uyg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrfeeigdeglecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjsehtkeertd dttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvges rghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedujeevjeffjeevud dutedvkeeiueeitddvieelfeekveejudefgeeuvdejhfeuleenucffohhmrghinhepvghn thgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 12 Jul 2024 08:36:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1720787815; bh=/a0z6mQ2VtykFTt6UGJdEpQlge5Dc5PGP6bMCn7fgQE=; h=Date:From:To:Subject:In-Reply-To:From; b=qAmFAuhfMu8BV54UCpk6KN6Dzi+EwmLhttn9N16iTS8vhNvCWJflYdCtd+WQgCCQ4 RoJ1cJh4lOMD0pN9SoUz1opPsyNBBlmlV5Rpo6A/faubd5D6py6VYvLFccRZVGuHxd JZjimAPQLagZRSAznFLRh0L0eZB8mZDm1z5bU7LOchJAoqiI6Z922hHVnXxwNs/yij MTEaad2HHWC7hidUkRvNMbQ0eeeLMhTbQtwKq6tgucr5Zb+U90ptYhDwSalzZuEaJS GPgLUPJ2gUQVQLwq5hZNu78zmM8c1OfT+XrZSrDCbCwVlFcm2JLw7hYc4QqGi5dT9c 6KEvlLIF108NQ== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id AF20B529; Fri, 12 Jul 2024 14:36:55 +0200 (CEST) Date: Fri, 12 Jul 2024 14:36:55 +0200 From: Alvaro Herrera To: fastcat@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18156: Self-referential foreign key in partitioned table not enforced on deletes Message-ID: <202407121236.cksghur2ltm7@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <18156-a44bc7096f0683e6@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, I hadn't noticed this report before; I'll have a look at it soon. On 2023-Oct-13, PG Bug reporting form wrote: > When a partitioned table has a self-referential foreign key, I'm finding > that the key is not enforced during deletes from the table. Hmm, yeah, I broke this in this commit Author: Alvaro Herrera Branch: master Release: REL_16_BR [614a406b4] 2022-10-07 19:37:48 +0200 Branch: REL_15_STABLE Release: REL_15_0 [6083132ab] 2022-10-07 19:37:48 +0200 Branch: REL_14_STABLE Release: REL_14_6 [483d26930] 2022-10-07 19:37:48 +0200 Branch: REL_13_STABLE Release: REL_13_9 [7d520e68e] 2022-10-07 19:37:48 +0200 Branch: REL_12_STABLE Release: REL_12_13 [669803af0] 2022-10-07 19:37:48 +0200 Fix self-referencing foreign keys with partitioned tables Clearly this area needs a lot more work. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "No nos atrevemos a muchas cosas porque son difíciles, pero son difíciles porque no nos atrevemos a hacerlas" (Séneca)