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 1vx2Bi-00Bakq-0B for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Mar 2026 12:15:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vx2Ah-000T0N-0g for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Mar 2026 12:14:47 +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 1vx2Ag-000T0E-1R for pgsql-bugs@lists.postgresql.org; Mon, 02 Mar 2026 12:14:47 +0000 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vx2Ae-000000000vO-2stA for pgsql-bugs@lists.postgresql.org; Mon, 02 Mar 2026 12:14:46 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 421E01D00218; Mon, 2 Mar 2026 07:14:43 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Mon, 02 Mar 2026 07:14:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= 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=fm2; t=1772453683; x= 1772540083; bh=vsHmzJzi3Yj60J0n9TYfIwBrtr63fPzuS98LiewSyv4=; b=q pz953EDVHN7q1MHlWRks/AnDaVjVkk5aJ4vY0bFL3m5fsENK70JceUPlvvpknlXw DCi7XDS1CHRBfFDO+O+A9PH7EzFsDdml45VCYxH5igbCoIlJY8+aaR7Wtbt4wcYS UwyCxP6Jr3cKCr1O+xqRlxlpISAJBnxd2QID+DN2DtymoyKHLrQ/FobaE5b8UFrO 7I/bUPlLlMXcnYl2QMxVDtRWQg2iTLZlgnBYlpCxFkczfpiDYjFG7m32uhKMqvL2 TovBSd8LX7ddWNul0ycYkgwDk8DHh/obTqVid3bjBCiPn12C9bqu5B4kW6mw/F9z Beq9R4aQfq6USNg4tYxVA== 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-sender:x-me-sender :x-sasl-enc; s=fm1; t=1772453683; x=1772540083; bh=vsHmzJzi3Yj60 J0n9TYfIwBrtr63fPzuS98LiewSyv4=; b=CxgaHfoYG5s6hec9A2WWWWypS28gv yhv6EnZPdJ1pGGLccMkeieoVP6osHnWa1+VAj8XX0oTJCMIIsP+5cZTzLqXnctO2 oElqf3proRQMzAusH3RoTNwePNPMotMZOPsrik4lO2Q/bR9C2jqdE8YP2Xyb0QCm UHVpYaYnyNlvagkg4rkQp1aiNLHHT7EHOyNXzlmhBZm5lZ45KMX+UR48N+Bskx4s LYEWhtldbbBBOqYxnvhWwPHlMz5cMmxdj4F0qOl7zd58fAB+yGUSQcSBx4c8GRR9 toLWkA14IFRlfmV7B7lJljCHgo6Gz4pAPVVtD0ppOdY6llJI7BnzusPPA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvheejieegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugfgjgesthekredttd dtjeenucfhrhhomheplmhlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehk uhhrihhlvghmuhdruggvqeenucggtffrrghtthgvrhhnpeeiudetgeejueehfffhgeevve dugedtkedtfeeigfekgfeuffetheduveegtedvjeenucffohhmrghinhepphhoshhtghhr vghsqhhlrdhorhhgpdgvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgeskhhurhhi lhgvmhhurdguvgdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtoheprgdrtghhohgukhhofihskhgrsehgmhgrihhlrdgtohhmpdhrtghpthhtohep phhgshhqlhdqsghughhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Mar 2026 07:14:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1772453680; bh=AkxEc4utCtEFrYcnxcJS23NMTw/xIl3mZ1hrxHRi6TA=; h=Date:From:To:Subject:In-Reply-To:From; b=56oLOf32DFfZy5nab5bcpkXcD5+8gek+wKT6XqyckH+VDEsIprEG6wmlH0Cu8/7mB CzR98FHxz0kJCKPTf0VqI9gfCfk03xCmljZI7e5ktTeYV5hjk/ab5eFX6TgpLGx+iy 7mKC0tyj7x53hc7H6CMSLP43kU3bTU6KF5c380NvQ5uJwjY6aQjG+GInf9cs8qiAWK 56Ip7aRrWXdEjKb8AAYeGNP9VfqvqQaCND+JOdOzxh8P5qcpkUjnE3dQ7CK3uU1sZD QLriGdPg9UrCzGU5dccuEXU6A+cucZqhyHiFJAY4Ct+Mgp+tuwpTILsOc5dk7nL9xh a40hns2dmjJsA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 5C8AD7A; Mon, 02 Mar 2026 13:14:40 +0100 (CET) Date: Mon, 2 Mar 2026 13:14:40 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: a.chodkowska@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19420: Zombie FK exists after partition is detached. Message-ID: <202603021208.em4tblut6ssg@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202603021010.lv5ugtfhqxdl@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Mar-02, Álvaro Herrera wrote: > [...] But we had bugs in this area > in previous versions, so maybe the problem is simply that you set up the > partitions with the old versions, and the FKs have not been updated. > See one of those fixes, probably the most relevant one, here: > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=53af9491a0439720094a11b72602952d79f59ac7 > > Version 16.0 already contained this fix, so it certainly shouldn't > happen with 16.6; Sorry, I misspoke -- the fix was not in 16.0, but for 16.5 in that branch. It's still true that 16.6 contains the fix. Here's a rundown of release numbers on each branch for that bugfix: Author: Álvaro Herrera Branch: master Release: REL_18_BR [53af9491a] 2024-10-22 16:01:18 +0200 Branch: REL_17_STABLE Release: REL_17_1 [5914a22f6] 2024-10-22 16:01:18 +0200 Branch: REL_16_STABLE Release: REL_16_5 [2aaf2a28b] 2024-10-22 16:01:18 +0200 Branch: REL_15_STABLE Release: REL_15_9 [5d83bad6b] 2024-10-22 16:01:18 +0200 Branch: REL_14_STABLE Release: REL_14_14 [46a8c27a7] 2024-10-22 16:01:18 +0200 Branch: REL_13_STABLE Release: REL_13_17 [d20194cea] 2024-10-22 16:01:18 +0200 Restructure foreign key handling code for ATTACH/DETACH ... to fix bugs when the referenced table is partitioned. (Here I must decidedly credit Jehan-Guillaume de Rorthais for working on this fix.) -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "La fuerza no está en los medios físicos sino que reside en una voluntad indomable" (Gandhi)