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 1s6tMC-002KSE-4E for pgsql-hackers@arkaria.postgresql.org; Tue, 14 May 2024 14:42:21 +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 1s6tMC-00FSwQ-3c for pgsql-hackers@arkaria.postgresql.org; Tue, 14 May 2024 14:42:20 +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 1s6tMB-00FSwH-3M for pgsql-hackers@lists.postgresql.org; Tue, 14 May 2024 14:42:19 +0000 Received: from wfhigh8-smtp.messagingengine.com ([64.147.123.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s6tM1-000Cjf-NZ for pgsql-hackers@postgresql.org; Tue, 14 May 2024 14:42:18 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id DB9F21800147; Tue, 14 May 2024 10:42:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 14 May 2024 10:42:07 -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=1715697726; x= 1715784126; bh=qqGDNNMpkwvHvS8EUjxQT4kdJcrttrs7s9Xc1f39gcs=; b=l BVCPRup+LBbZFl3je9rwKCsOjozzyIc9OCBhCFn1HHacobXiEt9etSutpU6qW38Q PmQNw+mh5LuLkfIxiddvmlEjQWrzDPo3oiHbd4gdIkD1wISx1FZf2t6MO824tDS4 VMv1Z0ADCfN0ZVg/0Tg9fWJa4PJ/60voVSc5uzgdjntcLL80E7hL69KCG4Jg56o/ K7UArPBznMhzdUAbLqwmxY6bWVufiSqt/8AWwTtrsN/0d9kiVjdfWI6J+jSuuI6w 5kf0QG7krWamquTYMryutohns+ep3zvCxFKzdWRmfGe18EpyL6TgS4x+kQP8oY/2 xmXVVoTp0NkRK6Jr9nPJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegiedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 May 2024 10:42:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1715697724; bh=EqJm5szxAmXJ32Jy6sk0g2bvUm3eFaqKBeRWF7Jn9Ng=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ccZ0kw4Ibo2MCbpSzC9soECOgYedA2065YJWZ1VxTsCR8t24//S5FnnlkRyUlV0hE rDB6IcpDzc3grUuw7c9BuN87LjEdXbChIbtBPVjh2gDSNtlziBz8JVWRyPg9/8MA+5 cA1ea1UbZKoie47+YNS6wdcLUTUtkDCDwRMdfq9qgwjv3ctU90mwVmgU/fW8M4GFIx pIomvNKHK18QVXCYeHit6xC8xQ/treZgcTWo9iCL2IaakT25A92PIrCOFiIcLnKf51 zacSi5a04Mo9kaS9uuuYwBJW7p4HowmLk7mhfHB2Co0HdPlWZXejtZ1XZ79HLIHweB avRFjDmmP+YRw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 30CA810B; Tue, 14 May 2024 16:42:04 +0200 (CEST) Date: Tue, 14 May 2024 16:42:04 +0200 From: Alvaro Herrera To: Robert Haas Cc: Dean Rasheed , Aleksander Alekseev , PostgreSQL-development , Amul Sul , vignesh C Subject: Re: Dump-restore loosing 'attnotnull' bit for DEFERRABLE PRIMARY KEY column(s). Message-ID: <202405141442.lk6qchbdesxo@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 2024-May-14, Robert Haas wrote: > On Thu, Mar 7, 2024 at 12:32 PM Alvaro Herrera wrote: > > On 2024-Mar-07, Alvaro Herrera wrote: > > > Maybe we can add a flag RelationData->rd_ispkdeferred, so that > > > RelationGetPrimaryKeyIndex returned InvalidOid for deferrable PKs; then > > > logical replication would continue to not know about this PK, which > > > perhaps is what we want. I'll do some testing with this. > > > > This seems to work okay. > > There is a CommitFest entry for this patch. Should that entry be > closed in view of the not-NULL revert > (6f8bb7c1e9610dd7af20cdaf74c4ff6e6d678d44)? Uhmm, I didn't realize there was a CF entry. I don't know why it was there; this should have been an open item, not a bugfix CF entry. This had already been committed as 270af6f0df76 (the day before it was sent to the next commitfest). This commit wasn't included in the reverted set, though, so you still get deferrable PKs from RelationGetIndexList. I don't think this is necessarily a bad thing, though these don't have any usefulness as things stand (and if we deal with PKs by forcing not-null constraints to be underneath, then we won't need them either). -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Postgres is bloatware by design: it was built to house PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)