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 1rwMGr-001ASU-1q for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 13:21:17 +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 1rwMGo-00D3jo-7G for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 13:21:14 +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 1rwMGm-00D3jg-HP for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 13:21:13 +0000 Received: from wfout4-smtp.messagingengine.com ([64.147.123.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rwMGi-0015En-Ib for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 13:21:11 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.west.internal (Postfix) with ESMTP id 197A11C00146; Mon, 15 Apr 2024 09:21:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 15 Apr 2024 09:21:01 -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=fm2; t=1713187260; x= 1713273660; bh=GcMAjtugQo6ACFQtLhx9lVe7i1GjvfVpXxAAnlYQPmk=; b=V zMpylakjluU6buk5d1fPpNczDFr93f7JICNWwACXLaefPEdT1wgnclcKlnrQq1cL Uz4Ly2sPoi6z5k4FJOWnn+W48hJJjZP5Y00XBuGtCbZoPuyXnR/3m8R3VUE4tCGp B80AYla8i2boQ7arDuO5A2E24+6lNeL7uDqxyoHIaqKF61zx4BmeclOFzyNhIW+f QZYcx7gCuJkVba2WSngm/8V8o5M1BjPMdVb0KVsIv1HuIGGIJTwtra61Ptg12HNA 2WUnBpqaYywYu1D9sG8HGFHm2h82Xh4o+DMJuBJFXhDkDjpcmxPlgwx7mkO3SE7z uCDAsK8aw1UlTVs9PDypg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejvddgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 Apr 2024 09:21:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1713187255; bh=WUnnALFl3G6Nu/zPFblaRiYy0KTD13Wf8HPflX4bFyk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=PUf88liYbmUFOM4/VyCmm7+MZ/15QEqZRTbUmMasN4czQv9D+J4pq4QqruGdXUZQE +OQaszjPWgl7HMt+tR/R7Qh1mr9grUekldc+9M2mtoIOgb7wvn+G8/NOC64Bb4SXdf jRxbtrJDDwiOBlCcNNQjslE0VywDrOA/bgzo5HY4YiAmT7hbhWPvUlq7WehWQSGVOj xqjqrZw4wuiJFnB7P/cES7hNhIr9ekQYo8u5TlmAuzFSfknPt5Ze1/CYG/fo3fj/G/ 4ApahUXfgDQToWhKepUV9K1O+QC7dc4WLrfUGphgRJAXcrem5uRS9azfG+GCjhn8Is 1ITF67Yr1ONWQ== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id BC6E43A3; Mon, 15 Apr 2024 15:20:55 +0200 (CEST) Date: Mon, 15 Apr 2024 15:20:55 +0200 From: Alvaro Herrera To: jian he Cc: Michael Paquier , Alexander Lakhin , Dean Rasheed , Peter Eisentraut , Robert Haas , pgsql-hackers@lists.postgresql.org Subject: Re: cataloguing NOT NULL constraints Message-ID: <202404151320.uqfxlcnl4zrp@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 (I think I had already argued this point, but I don't see it in the archives, so here it is again). On 2024-Feb-07, jian he wrote: > if you place CommandCounterIncrement inside the `if (recurse)` branch, > then the regression test will be ok. Yeah, but don't you think this is too magical? I mean, randomly added CCIs in the execution path for other reasons would break this. Worse -- how can we _ensure_ that no CCIs occur at all? I mean, it's possible that an especially crafted multi-subcommand ALTER TABLE could contain just the right CCI to break things in the opposite way. The difference in behavior would be difficult to justify. (For good or ill, ALTER TABLE ATTACH PARTITION cannot run in a multi-subcommand ALTER TABLE, so this concern might be misplaced. Still, more certainty seems better than less.) I've pushed both these patches now, adding what seemed a reasonable set of test cases. If there still are cases behaving in unexpected ways, please let me know. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "La espina, desde que nace, ya pincha" (Proverbio africano)