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 1sWJCW-00EPgC-Pm for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jul 2024 17:21:25 +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 1sWJCU-00F5mC-3d for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jul 2024 17:21:22 +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 1sWJCS-00F5m4-Le for pgsql-bugs@lists.postgresql.org; Tue, 23 Jul 2024 17:21:22 +0000 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWJCQ-0014Fb-43 for pgsql-bugs@lists.postgresql.org; Tue, 23 Jul 2024 17:21:19 +0000 Received: from compute8.internal (compute8.nyi.internal [10.202.2.227]) by mailfout.nyi.internal (Postfix) with ESMTP id 676B11380150; Tue, 23 Jul 2024 13:21:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute8.internal (MEProxy); Tue, 23 Jul 2024 13:21:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm3; t=1721755275; x= 1721841675; bh=up+y108vnd14MCmLZSsDK4mDrIphp5dCI1rq+8XAbDQ=; b=M wPaSKv8XBC/3ltTXtpSXQDVkqLSL295y8d97rMrQF/S/7gFtRxgIWv7zRTXabd1m T1DeT70M8aD+bBdoPTOjIa7M/rMxxsIyDzglWEgdQ6WF4q9CLckeGpTLNMtErBGP 5r2c1tlpwjffdHFHUSwwoPif9mZiAPUkFxJSwDU/Q5zGkZ0B6B/xjFhe/lTgZPZK ELaMQbpBR35dnp7zWLTQU8HbzI72NFiU6BeBoYph+5M2RAdmGnbFrjGqAFaxisUp jWGFd5toafeU2j0tEwAFI1qjHhevijmQMCIIF68ZpEBrFC0jGyjD6lgqdHCTVdgL ROl2qHUK2O0cRSqjWUWrQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheelgdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfggtggugfgjsehmke erredttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeduleekkefgtd dttedtkefguddvieffleetgeejiefhteehkeevfeettdduvdfhueenucffohhmrghinhep vghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhr ghdpnhgspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Jul 2024 13:21:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1721755272; bh=aLaTn2bbCFlxF+/lMa31MRXCoHkscQ5S1amYVYqazEQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=L7V7ExbzmRDs+0qeY/6uVms4UX/PPUK3NcqCu2o4upJHFJkPUkW5ZsQSoF5jrp5xb Okm/Tj6o0rPzhjn0Z0YgThznc8M1MKxa/WZKSvx46KlzhdrBmargO2g4V4yr5rSgTD emdYnI07Di/OQcIXYx9rkac2Ow03g3rtqmjH66Xy1THafR9pXBA3lgfNJt6y3tPYfq UPKMfW5B5dGmQ5yCszeFYMh0seZQxsFBEKddcRTD5fJ/ppWv3UEHK4zYLoUSUtuBlA tOyQd6gqpbdRTZ8vdd2diNu/s5tj777XWyZWC+8YcTFhKIA3ZHH0kHEQ5dXcu5wQRU 1Yj4GN5YfdS+g== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 2F1B7BE; Tue, 23 Jul 2024 19:21:12 +0200 (CEST) Date: Tue, 23 Jul 2024 19:21:12 +0200 From: Alvaro Herrera To: Tom Lane Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18550: Cross-partition update of a former inheritance parent leads to an assertion failure Message-ID: <202407231721.772zsh7kjvki@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tzghwpfillwk4o4f" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1061674.1721752542@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --tzghwpfillwk4o4f Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2024-Jul-23, Tom Lane wrote: > I observe that in the case given, t1 still has pg_class.relhassubclass > true after the ATTACH PARTITION. Maybe it'd be wise to force that > false after verifying there are no subclasses? (I tried fixing it > manually, and that prevents the assertion crash.) Yeah, that seems to work. We can do that essentially for free in StorePartitionBound(), like in the attached (which was taken in 14). I'd add Alexander's script as a test too, somewhere near the bottom of create_table.sql. If the affected table is a foreign table, it doesn't seem to have the same problem (I tried using contrib_regression's ft1 as t1 in Alexander's script). I suspect that's because we assume somewhere that foreign tables are not in turn partitioned. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ --tzghwpfillwk4o4f Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Reset-relhassubclass-when-attaching-as-a-partition.patch"