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 1rx0i2-005pxa-Ru for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 08:32:02 +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 1rx0i1-009t9C-Fx for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 08:32:01 +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 1rx0i0-009t94-3Y for pgsql-hackers@lists.postgresql.org; Wed, 17 Apr 2024 08:32:01 +0000 Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rx0hv-003GTr-U2 for pgsql-hackers@postgresql.org; Wed, 17 Apr 2024 08:31:58 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id C1DDF11400A7; Wed, 17 Apr 2024 04:31:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 17 Apr 2024 04:31:54 -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=1713342714; x= 1713429114; bh=hZiVIxd/EMZvWORWuuSM6wdUNsKzdNjNBOMVXxCld6A=; b=A 4jXT0lz6h+PtJF7j8UayumGGHoj3wDy7Dm27+6jayISMMKM+VGO+VkxV/E5lzATx QfWxPvHGyF2DvPhddIG5Wyf0FY4ZGBKCxYx+3JunJQZLt8QfMW1c44LQehOeTIw8 fU7rHxLtCYZxYyEWXDpNxRHDQJ/eWppFmDXTN8YhoFDe5R4Dl6TOEyOTqilFnk1P ojXzpvQiK6c4ty/Wt2+UE5Jowl+D2NLSu42hr8h121EVEObGBpu9rt9CydFguAA8 EPsclZ/FbRuTpLnCrVb9eDAMYVJVrpXLWCh1Oc8NLsoivv5jBtazP+7JM+ytP1GZ 1eNK7dk4litVFsOua651A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejkedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Apr 2024 04:31:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1713342712; bh=hO1ioVSSq6aWZF9/HlNp1jMt9T/euPq7NeksgFX4yO8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=HXZJVrIvLeFRpeT+e6JV8zlzri+23JivYhxfrqmFv9vMhWLcKtVlWdGwYMhU8yVaP mT2r6dUKmmb50VJ2OBweazpaj2U2W2S7G1h0ks/T7GeY0sJGlpToGqHrrPu4BYe4nj yHmtkw4lTGvwXXjFPl6qv8KDceNmvRBpbZL5XTms0mlBvx5EXWE4Nt7fMeDuOAxllc qAM2ZeCXVScmoH9hW8XDGTY74G99olF5HWPi087q35nYkF8EcKqv1VKlOvIEXbXSQe sUf7yiFIwpGzWsl5r8tWUYymHoyP6KNVNDwBWhen4ybjoZD0NFFJefJziUirloNb2y f1Vmc327HFTrQ== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 35F61385; Wed, 17 Apr 2024 10:31:52 +0200 (CEST) Date: Wed, 17 Apr 2024 10:31:52 +0200 From: Alvaro Herrera To: Michael Paquier Cc: Tom Lane , Justin Pryzby , Alexander Lakhin , Peter Eisentraut , Soumyadeep Chakraborty , Zhihong Yu , pgsql-hackers@postgresql.org, Ashwin Agrawal , vanjared@vmware.com Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables Message-ID: <202404170831.imev4pwiztdo@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-Apr-17, Michael Paquier wrote: > Yeah, that would be easy enough to track but I was wondering about > adding the relkind instead. Still, one thing that I found confusing > is the dump generated in this case, as it would mix the SET and the > ALTER TABLE commands so one reading the dumps may wonder why the SET > has no effect for a CREATE TABLE PARTITION OF without USING. Perhaps > that's fine and I just worry too much ;) Hmm, maybe we should do a RESET of default_table_access_method before printing the CREATE TABLE to avoid the confusion. > The extra ALTER commands need to be generated after the object > definitions, so we'd need a new subroutine similar to > _selectTableAccessMethod() like a _selectTableAccessMethodNoStorage(). > Or grouping both together is just simpler? I think there should be two routines, since _select* routines just print a SET command; maybe the new one would be _printAlterTableAM() or something like that. Having _select() print an ALTER TABLE command depending on relkind (or the boolean flag) would be confusing, I think. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/