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.98.2) (envelope-from ) id 1xASOc-00000002elm-34Co for pgsql-bugs@arkaria.postgresql.org; Sat, 26 Sep 2026 13:24:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xASOb-00000004Nby-47bg for pgsql-bugs@arkaria.postgresql.org; Sat, 26 Sep 2026 13:24:53 +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.98.2) (envelope-from ) id 1xAOGP-00000003sJ8-2F6M for pgsql-bugs@lists.postgresql.org; Sat, 26 Sep 2026 09:00:09 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xAOGN-00000001NDx-0LuX for pgsql-bugs@lists.postgresql.org; Sat, 26 Sep 2026 09:00:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=SRrFqHwaheZvL+QwqaOj3sR9DSp1FWiJpXFzhezbZMc=; b=irwPtt7Qm4maJd7xIW8dEA35gp WdgEZnMSRgeLsz2eijpQCewFU98rRk6VTwKm4/g13wGGTOlJVhcDfKh50PB/0CveNJlhgGjdMYeoF pOsUeIAztCjFgYb20co7DmUM/3zQXs3fDewRrt5an1twL3ckfsNhMK7UeDEWp/WcH9HAknA7RkI8W yoMQVaSvrc/IzKrhZsjiyONlvyTSdnf75bSQEhape/4FpdDHNrzJqH+aKmctM0m/GMbsgHpfQUs5H FfCnNy/OSrjGaCGC606mMgeG+wCfSE2MSaYwG9wwA0Q2maWR1pu5XKuo7ddpICA+gJGSOOuxL/zvu pRAILteg==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xAOGL-003wn3-2h for pgsql-bugs@lists.postgresql.org; Sat, 26 Sep 2026 09:00:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xAOGJ-0000000BRyG-31g8 for pgsql-bugs@lists.postgresql.org; Sat, 26 Sep 2026 09:00:04 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19723: CREATE INDEX racing with ALTER INDEX ATTACH PARTITION triggers unexpected internal error To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: exclusion@gmail.com Reply-To: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Date: Sat, 26 Sep 2026 09:00:00 +0000 Message-ID: <19723-8a47b625c2c64f75@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19723 Logged by: Alexander Lakhin Email address: exclusion@gmail.com PostgreSQL version: 19beta4 Operating system: Ubuntu 24.04 Description: =20 The following script: echo " CREATE TABLE t (a int, b int) PARTITION BY list (b); CREATE TABLE tp1 PARTITION OF t FOR VALUES IN (1); " | psql for ((i=3D1;i<=3D100;i++)); do echo "iteration $i" echo " DROP INDEX t_a_idx; DROP INDEX t_a_idx2; CREATE INDEX t_a_idx ON ONLY t (a); CREATE INDEX tp1_a_idx ON tp1 (a); " | psql echo "ALTER INDEX t_a_idx ATTACH PARTITION tp1_a_idx;" | psql & echo "CREATE INDEX t_a_idx2 ON t(a);" | psql wait grep 'ERROR: bogus pg_inherit row' server.log && break; done tirggers: iteration 3 DROP INDEX DROP INDEX CREATE INDEX CREATE INDEX ERROR: bogus pg_inherit row: inhrelid 16400 inhparent 16399 ALTER INDEX 2026-09-26 04:36:22.653 EDT|user|regression|6ab78406.1ddce8|XX000 ERROR: bogus pg_inherit row: inhrelid 16400 inhparent 16399 which is described as unexpected: /* * A pg_inherits row exists. If it's the same we want, then we're * good; if it differs, that amounts to a corrupt catalog and * should not happen. */ if (inhForm->inhparent !=3D parentOid) { /* unexpected: we should not get called in this case */ elog(ERROR, "bogus pg_inherit row: inhrelid %u inhparent %u", inhForm->inhrelid, inhForm->inhparent); } Reproduced starting from 8b08f7d48.