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 1tG341-000btd-Rd for pgsql-general@arkaria.postgresql.org; Tue, 26 Nov 2024 21:25:41 +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 1tG33z-009qny-8s for pgsql-general@arkaria.postgresql.org; Tue, 26 Nov 2024 21:25:39 +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 1tG33y-009qnl-TZ for pgsql-general@lists.postgresql.org; Tue, 26 Nov 2024 21:25:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tG33v-0042bz-MK for pgsql-general@lists.postgresql.org; Tue, 26 Nov 2024 21:25:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4AQLPWKY1723212; Tue, 26 Nov 2024 16:25:32 -0500 From: Tom Lane To: Paul Foerster cc: Adrian Klaver , pgsql-general list Subject: Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION In-reply-to: References: <5456A1D0-CD47-4315-9C65-71B27E7A2906@gmail.com> <78ec2af8-48f2-42c0-b317-cbb77cc5adc8@aklaver.com> Comments: In-reply-to Paul Foerster message dated "Tue, 26 Nov 2024 20:02:33 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1723210.1732656332.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 26 Nov 2024 16:25:32 -0500 Message-ID: <1723211.1732656332@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Paul Foerster writes: >> On 26 Nov 2024, at 17:56, Adrian Klaver wro= te: >> When you run the query again do you get the same two statements? > Yes. I can repeat the above 4 steps as much as I want. The result remain= s the same. I would have expected to have an empty result doing the final = repeated select, but it shows exactly the same output. I would have expected an empty result too. Can you confirm that p_ci_pipelines used to be a partition of something? Can you show us the full DDL (or psql \d+ output) for the partitioned table it used to be part of, and for that matter also for p_ci_pipelines? Did the FK used to reference the whole partitioned table, or just this partition? I'm suspicious that our repair recipe might not have accounted for self-reference FKs fully, but that's just a gut feeling at this point. regards, tom lane