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 1vA9hI-00Ek8t-A3 for pgsql-bugs@arkaria.postgresql.org; Sat, 18 Oct 2025 16:22:23 +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 1vA9hH-008M4Z-3D for pgsql-bugs@arkaria.postgresql.org; Sat, 18 Oct 2025 16:22: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 1vA9hG-008M4P-IL for pgsql-bugs@lists.postgresql.org; Sat, 18 Oct 2025 16:22:21 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vA9hD-002TyO-1s for pgsql-bugs@lists.postgresql.org; Sat, 18 Oct 2025 16:22:20 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 24394140006C; Sat, 18 Oct 2025 12:22:19 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sat, 18 Oct 2025 12:22:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1760804539; x= 1760890939; bh=Fpex1Twh5aVE1DNzULdsa7Yt+skcdlwupi+rQHsL/f8=; b=H 0cWVsWVk5HCh3rUN9LOd5CtkeYak0v2A74+ceu54vbILgCdxozA8MAXF5xFuuVBX +iYvHIDxqovJ6r+M8wR3WUyWKGfBXikCwjwwA7HSo7UQiaPfuZ0qbmEo4UkNndEA 4A6gPJ4euaaS1dAsCZm114zwTeN6XjpbeCS2pG04IUxT7mlsbtkoqpz97/g1qbxa vOFlmodr5tHR9xu4VZwPo4qyWm5eSeRGnDqTt6ccTNjq7oDfyuyVElcNCAVrHq/j WYi8A1N729ZYempi2pmRmcrHJH1sDuTEMKMwUjM/nFZidAyTg85osIeXSm94cs3C ILY7tsji2SzYvKFrBkvhg== 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-sender :x-me-sender:x-sasl-enc; s=fm2; t=1760804539; x=1760890939; bh=F pex1Twh5aVE1DNzULdsa7Yt+skcdlwupi+rQHsL/f8=; b=MC2uL4AcnWnF+2J/D ge+yBt5WDUiNVp3HUaeTc4d1Tl0D/sbhufs6USfzTof5oMj9Rc+O3RCOBvvfV+Qf 2Cwb9+1c4HV+cTHLjKrLVVhios/nRSQ4cuT35h4C+VjP8CP2BD+yDI9Q4+LUw8rI UHRlWrRXE4pDENnMfHuPQ46ktpbrS7c+i9vkFhMzyzzmJTZej3HwcCNMHaIoYd9V 8tz8V/pJaW87BOmO3g1//TxV2MjYi2lsxV8VMWSzOag1jmZyZVbL1EEQtzc4Kr/g ZAo1g3UoFx6aTbA1gjk52Gr9aDvrgPoqBzUW9iybVN/gEoN9rTSRl916AkZhP23J KiaBg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufedvhedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfggtggugfgjsehtkeertd dttdejnecuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvges khhurhhilhgvmhhurdguvgeqnecuggftrfgrthhtvghrnhepteeuvdehffekvefgueehve etveekgfegtddtueefueehuddutdfhfeffhfejfeffnecuffhomhgrihhnpegvnhhtvghr phhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgdpnhgspghrtghp thhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghnughrvgifsghilh hlvgesghhmrghilhdrtghomhdprhgtphhtthhopegughhrohiflhgvhihmlhesghhmrghi lhdrtghomhdprhgtphhtthhopeguihhlihhpsggrlhgruhhtsehgmhgrihhlrdgtohhmpd hrtghpthhtohepphhgshhqlhdqsghughhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdr ohhrgh X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 18 Oct 2025 12:22:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1760804536; bh=Msd6vVxp7Thvk/sq4Mqahfy5aMSqvd38x8ERfnYXXzE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=XK5P5F1Xy816CUTaqjJ8RbXuGh2CH6SdbP6hP4S1DPIUUEbWkN0IL6v4S0S/OeK17 lZvpM0o31relpBU9jzoa/M5pFC4JvnqfmoKlN053ce+UdCqhkPqE/wNJY1WF+SB3SR TwvyQgYGeoim4SYuNf2Oz7h3+Dj8G/n6s6POAPjtDbROK04EW7jZGEa4uPG1seaVUx wy7j1zHkW8j0i26yTBq4/nvIEttDo7v+7dTKYtjmG+wwQHNE0jjuJg558ThOU821lF n12lg7L25al28EM/ErGbq44wt5G+CWkVc0TJSDgz3GggkhjbOnZAlRwgu3XxVAR1Sl SIod+wmiVoOZA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 4B8B976; Sat, 18 Oct 2025 18:22:16 +0200 (CEST) Date: Sat, 18 Oct 2025 18:22:16 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Dilip Kumar Cc: David Rowley , andrewbille@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19074: pg_dump from v18 loses the NOT NULL flag in the inherited table field when dumping v17-databases Message-ID: <202510181619.crppv2bdx2xm@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Oct-06, Dilip Kumar wrote: > I think we can fix it in getTableAttrs(), see attached, with that I > can see my dump is correct. This is just a quick way to show what I > am thinking, maybe we can improve this condition. Pushed, thanks. I added a test so that cross-version upgrade will hit this. Because this code is not used except when upgrading from 17 or older, I had to modify 17 even though that version needs no code changes itself. (I verified that the pg_upgrade test fails if I have this table in a pg_dumpall from version 17 -- and the diff is exactly this missing NOT NULL constraint.) -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Investigación es lo que hago cuando no sé lo que estoy haciendo" (Wernher von Braun)