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 1tt0Vp-007bZw-Nj for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Mar 2025 08:35: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 1tt0Vo-001ceM-FG for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Mar 2025 08:35:24 +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 1tt0Vo-001ceB-3f for pgsql-hackers@lists.postgresql.org; Fri, 14 Mar 2025 08:35:24 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tt0Vk-002nwY-0F for pgsql-hackers@lists.postgresql.org; Fri, 14 Mar 2025 08:35:23 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 8679825401C3; Fri, 14 Mar 2025 04:35:19 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Fri, 14 Mar 2025 04:35:19 -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-sender :x-me-sender:x-sasl-enc; s=fm1; t=1741941319; x=1742027719; bh=f HvYh8pMw9Bj7bMuzs9oVHRNE2Hb3jjjsNMRFKdtxAA=; b=G//SSz4sCwNDIG7M0 X04FXqiUCHEgv97nCm5IZqDxXomXBPGeGjYBho7Gh47GMioVaG7lnoQpP2BHfEfA FH+EGIhYAwZWQkyZPnRj4AGbh5Bu7E3SQXrhwlkF85LENtipuUwmCh7cfwQnZ0DK uWvLpO12YLi1SHL6zNE5aNlaEx0MIEcVqbNb1AJfsD2eKNna7ByHm+B6AzOjImrn W6c0TQJUnR0E6T5PsMJEuMQxip2NE64G7bZPC5/1eG2BmbgIJny593n+OCsFqjnK Aoi5oAZc3VW790blak17lQyZpJIbVGkHUiMzbkOSVGcPjUENpINFwL7QXxe7pbw5 uavRg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddufedtfeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhf fvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpemllhhvrghrohcujfgvrhhr vghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrg htthgvrhhnpedvheeuffehgfeukeeufeehhefghfeugfefudekjeevudffgeffkeegffff veegheenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegr lhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshht ghhrvghsqhhlrdhorhhgpdhrtghpthhtohepughhhigrnhesnhgrthgrrhgrjhdrshhu X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Mar 2025 04:35:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1741941315; bh=MV9TBzHQcX99Db4C/cOUD8qhaTJwK6oKNzoshfq9A1I=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=K6NNpvip+y/Hj3pgczBfclU+1bJjEaPx6fUKd0qDkBZWj9yDAYuBJ35ZnbT2+05aL rCcc8xYD9ofbD2hHQ5BdHSEJsYMU5z7i4w4ddamMBgTmREmFUpAa4vnH8TGlt2A7+J Nrkfb4+AeVbqhRlTNhBQ7ao3tqAYireGwy+Fz6jpNWqvbNATVjYJiMNGDY7eSzjrF0 Vy6GGkSy0OIHiFOrIlU9wNZVbYYFbQMHMLp0KxqcaGxoIbtNqYA2whykhpEgjk/lrX BOHTa1DDdjqlkgy3MaHuV3yLhn97tIOwdoD3bKw3agp559SlRZqjQ+vNUEhKZXtEUh CEhO70hYpDikw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id BECA187; Fri, 14 Mar 2025 09:35:15 +0100 (CET) Date: Fri, 14 Mar 2025 09:35:15 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Nikolay Shaplov Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Minor rework of ALTER TABLE SET RelOptions code Message-ID: <202503140835.a7rr73tvaeic@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1913854.tdWV9SEqCh@thinkpad-pgpro> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Mar-07, Nikolay Shaplov wrote: > Patch description is following: > > 1. `isnull` variable is actually needed in a very narrow scope, so > it is better to keep it in that scope, not keeping it in mind in while > dealing with the rest of the code. > > 2. Toast table RelOptions are never altered directly with ALTER command. > One should do ATLER to a heap relation and use toast. reloption namespace > to address toast's reloption. If you get `ATExecSetRelOptions` called with > `RELKIND_TOASTVALUE` relation in the args, something is really wrong. We > should throw asserts, errors and whistle as loud as we can. These are two separate things, I would have suggested to post them as two separate patches. And the second one lacked tests, so I added some. I have pushed both now, thanks. I can't unfortunately promise to review the larger reloption refactoring patch for 18. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Java is clearly an example of money oriented programming" (A. Stepanov)