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 1rx03b-005mSv-H9 for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 07:50:15 +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 1rx03a-009bJ2-1Q for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2024 07:50:14 +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 1rx03Z-009bIu-Di for pgsql-hackers@lists.postgresql.org; Wed, 17 Apr 2024 07:50:13 +0000 Received: from fout5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rx03S-003GDU-AO for pgsql-hackers@postgresql.org; Wed, 17 Apr 2024 07:50:12 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id D91D31380128; Wed, 17 Apr 2024 03:50:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 17 Apr 2024 03:50:04 -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=1713340204; x= 1713426604; bh=Ov6MEGpMlLwqlJRg1V9P3yBYZD+S/U1x3fRTGu5SYQU=; b=V ZUq2Zf8eULQZSr/xwjfECDLo2GEI1bsxaGPzQ1Eqyjed1FKCKXa2MrLs3EJLJDkw qHLjiMpgxrmrRGwE8k2Jcdz7uSTkdZo17PPeLL+rAn6LZVyXpdqR0AtSf2CfSQB9 YpuyZ3781mx7S2d36/Xie/2fMSQcheaeReG6JRKpqKlT0ffEPSnQglteXjpg/cyZ kQQhv+yDIAXwOIpxKLOLvcyjR9xIWAG0q4OQ7okVYWan6vMzuSnEI5AGdaCaPqOT Jjxl78GhdMOciM/V9sL+U9n3btO3pkuI4cCheAceQF/feNBzc2ZvTuVeAAVjAiZP 98hAByGQ2X20OQwA9X/bA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejjedguddtkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeej keffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Apr 2024 03:50:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1713340202; bh=aSXpTHCJfTZa5r0YjxQ5fVHzVaNENzk4kaDhUbhIEJA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=a15kqMhxcPvm8/JT80wCp4EgH8bo0ekhYwV/gr4ev890vGJ5665b9LQPByj8vDalt QLQcf0VcWJrAgIm/6TnQxL5DJQbEADX4kVHXx59sx9BJ9xwbkv3/zJxwBlCQNmLBMt HTQWcF4Tj+/E73iwFaYKrm5lrVr+Vq0rL7vScv5/qE2CWxRmJKkWYWGcuZTD2Sg1Gl 8fqqOLUnoFAps0+G6LCAMOrbWXTnq5Lfgfka7JuxQ0bzIpP2ZlCmJkj7+xsqVQA8es C1xaKKbiT4ldaY46sOMGEgPwj/xNhd5zBD4G7vV1Do3sCN+CRFmotcKIKVfKx4tmin vbfwAo26Biusg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 47CB3385; Wed, 17 Apr 2024 09:50:02 +0200 (CEST) Date: Wed, 17 Apr 2024 09:50:02 +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: <202404170750.3672wigvldoq@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202404170740.dv4jwhwvdieb@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Apr-17, Alvaro Herrera wrote: > Hmm, cannot we simply add a USING clause to the CREATE TABLE command for > partitioned tables? That would override the > default_table_access_method, so it should give the correct result, no? Ah, upthread you noted that pg_restore-time --no-table-access-method needs to be able to elide it, so a dump-time USING clause doesn't work. I think it's easy enough to add a "bool ispartitioned" to TableInfo and use an ALTER TABLE or rely on the GUC depending on that -- seems easy enough. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/