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 1rxTrY-0094dX-Dq for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 15:39:48 +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 1rxTrW-006Huv-H6 for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 15:39:46 +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.94.2) (envelope-from ) id 1rxTrV-006Hog-5C for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 15:39:46 +0000 Received: from fout1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxTrN-001eLX-1U for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 15:39:44 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id AB2D913800EC; Thu, 18 Apr 2024 11:39:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 18 Apr 2024 11:39:33 -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=1713454773; x= 1713541173; bh=Fnx15ZS9ddIvb0RpjOhn8z+y6CavOuy7/URqa8KPmXg=; b=E vDqr9XNXJN8wUJG6OFF/XJkmWoQwbSTcM3mBPH6G1O5113R9OmR66EqDmnv92EFZ 4MPSJDcQBzk096pKHDZpkzRxIRhdrntOVFEPnMuPrhpacBemu5TA/WiUGyW+hiry vSVbePamRmv0hodSUKO4ipM0GTNVbwo1PAgj2zc7pUOowg/V86vE9GEhsKJcapat H9/FiX3fj3NnzN0/6qP2tbLfvQFkLETm0kav04kgp2WJZUXbG9eBHU2jC7rEMIRp SFOADRL4+IMA3w8iuL/Toqnm0uxvik0TLohIpH5oR2BT8E9S12pYxPSOP7FyzK2I DXJFbCS7osRvc8n1lodCg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudektddgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Apr 2024 11:39:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1713454771; bh=jvdFCL1QO33f0oujhP0wKG98Zci2NG/Nb2eT46aBOfY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=a9sYtE9k8EpZKMEHAzNgtcnrg704S0PxBuDw8jn0OfyRxR05epr5hYX2kqCvMscBg 72qnXkf0S58SMTExRvJhySdvdJbc50HDJGJy9hVLSJCfhTld+GeMMiZnH9xAWVbJkh MC4cnFtjBAoS1HzI8cuFSe6SUbczterRK64JstFJVAlng29W0qavDq6b0lFo50HVdB ue8i13dB6ZElMt0brbnP7tbGfSHaYDm5FJG7XrX6Purz9BcSqIwidunHGAZVu8mBV8 EqglFe0QUBAzfSA7dfhnVJuXBjyCihPArfTYl4czGT3z4FLeHemeBbf4eDIiqmiQqR fpYCzhN4JdqEQ== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 72B8D385; Thu, 18 Apr 2024 17:39:31 +0200 (CEST) Date: Thu, 18 Apr 2024 17:39:31 +0200 From: Alvaro Herrera To: pgsql-hackers@lists.postgresql.org Cc: Andrew Dunstan Subject: Re: pgsql: Fix restore of not-null constraints with inheritance Message-ID: <202404181539.lh42llaesnv3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202404181408.kqlwnqwshxtr@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Apr-18, Alvaro Herrera wrote: > On 2024-Apr-18, Alvaro Herrera wrote: > > > Lastly, make two changes to pg_dump: 1) do not try to drop a not-null > > constraint that's marked as inherited; this allows a dump to restore > > with no errors if a table with a PK inherits from another which also has > > a PK; 2) avoid giving inherited constraints throwaway names, for the > > rare cases where such a constraint survives after the restore. > > Hmm, this last bit broke pg_upgrade on crake. I'll revert this part, > meanwhile I'll be installing 9.2 to see if it can be fixed in a better way. Eh, so: 1. running "make check" on pg_upgrade using an oldinstall pointing to 9.2 fails, because PostgreSQL::Test::Cluster doesn't support that version -- it only goes back to 9.2. How difficult was it to port it back to all these old versions? 2. running "make check" with an oldinstall pointing to 10 fails, because the "invalid database" checks fail: not ok 7 - invalid database causes failure status (got 0 vs expected 1) # Failed test 'invalid database causes failure status (got 0 vs expected 1)' # at t/002_pg_upgrade.pl line 407. not ok 8 - invalid database causes failure stdout /(?^:invalid)/ 3. Lastly, even if I put back the code that causes the failures on crake and restore from 10 (and ignore those two problems), I cannot reproduce the issues it reported. Is crake running some funky code that's not what "make check" on pg_upgrade does, perchance? I think we should SKIP the tests with invalid databases when running with an oldinstall 10 and older, because that commit only patches back to 11: Author: Andres Freund Branch: master [c66a7d75e] 2023-07-13 13:03:28 -0700 Branch: REL_16_STABLE Release: REL_16_0 [a4b4cc1d6] 2023-07-13 13:03:30 -0700 Branch: REL_15_STABLE Release: REL_15_4 [f66403749] 2023-07-13 13:04:45 -0700 Branch: REL_14_STABLE Release: REL_14_9 [d11efe830] 2023-07-13 13:03:33 -0700 Branch: REL_13_STABLE Release: REL_13_12 [81ce00006] 2023-07-13 13:03:34 -0700 Branch: REL_12_STABLE Release: REL_12_16 [034a9fcd2] 2023-07-13 13:03:36 -0700 Branch: REL_11_STABLE Release: REL_11_21 [1c38e7ae1] 2023-07-13 13:03:37 -0700 Handle DROP DATABASE getting interrupted -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Cada quien es cada cual y baja las escaleras como quiere" (JMSerrat)