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 1sgKCl-000jGV-KE for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Aug 2024 08:27:03 +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 1sgKCi-00C6UB-57 for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Aug 2024 08:27:00 +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.94.2) (envelope-from ) id 1sgKCh-00C6U3-Gh for pgsql-hackers@lists.postgresql.org; Tue, 20 Aug 2024 08:27:00 +0000 Received: from mail1.dalibo.net ([51.159.93.128] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgKCf-000XRw-0M for pgsql-hackers@postgresql.org; Tue, 20 Aug 2024 08:26:58 +0000 Received: from karst (86-222-35-157.ftth.fr.orangecustomers.net [86.222.35.157]) by mail.dalibo.com (Postfix) with ESMTPSA id 9DC3F26FA5; Tue, 20 Aug 2024 10:26:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1724142414; bh=OvzjZc1UdrTha4tnL6VNWdBJ0PhqcTxPgSpmMJeFNns=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cBpQ5EZ1fnXeAaI4+jvA8khAdjFBOF4DayCVle66duRGdr6lV0Yt4z9F+0ZcMNVcV t8+y2sB6/gSNOOAmEpm5KR3ZFrDfRSXft0yPzSh2A3+VCaH3WeKHKbpWLPZxMkir+X BusEfmrIYleBB/NDA6DsperHk/fetM9fZzzECAGo= Date: Tue, 20 Aug 2024 10:26:51 +0200 From: Jehan-Guillaume de Rorthais To: Alvaro Herrera Cc: Tender Wang , Junwang Zhao , "pgsql-hackers@postgresql.org" , Alexander Lakhin , Baehler Thomas SBB CFF FFS , Guillaume Lelarge Subject: Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails Message-ID: <20240820102651.273ecdf5@karst> In-Reply-To: <202408072250.2c4fkhwf56lk@alvherre.pgsql> References: <202408072250.2c4fkhwf56lk@alvherre.pgsql> Organization: Dalibo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 7 Aug 2024 18:50:10 -0400 Alvaro Herrera wrote: > On 2024-Jul-26, Tender Wang wrote: >=20 > > Junwang Zhao =E4=BA=8E2024=E5=B9=B47=E6=9C=8826=E6= =97=A5=E5=91=A8=E4=BA=94 14:57=E5=86=99=E9=81=93=EF=BC=9A > >=20 > > > There is a bug report[0] Tender comments might be the same issue as > > > this one, but I tried Alvaro's and mine patch, neither could solve > > > that problem, I did not tried Tender's earlier patch thought. I post > > > the test script below in case you are interested. > >=20 > > My earlier patch should handle Alexander reported case. But I did not > > do more test. I'm not sure that wether or not has dismatching between > > pg_constraint and pg_trigger. > >=20 > > I aggred with Alvaro said that "requires a much more invasive > > solution". >=20 > Here's the patch which, as far as I can tell, fixes all the reported > problems (other than the one in bug 18541, for which I proposed an > unrelated fix in that thread[1]). If you can double-check, I would very > much appreciate that. Also, I think the test cases the patch adds > reflect the provided examples sufficiently, but if we're still failing > to cover some, please let me know. I'm back on this issue as well. I start poking at this patch to review it, test it, challenge it and then report here. I'll try to check if some other issues might have lost/forgot on they way as well. In the meantime, thank you Alvaro, Tender and Junwang for your work, time, research and patches!