Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ph2K3-0001We-Do for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2023 05:56:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ph2K1-0000yo-7v for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2023 05:56:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ph2K0-0000yf-UI for pgsql-hackers@lists.postgresql.org; Tue, 28 Mar 2023 05:56:40 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ph2Jy-0006nf-Pb for pgsql-hackers@postgresql.org; Tue, 28 Mar 2023 05:56:39 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id CE0E25C009A; Tue, 28 Mar 2023 01:56:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 28 Mar 2023 01:56:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1679982997; x=1680069397; bh=89 ELLowJTnWKSOQuc9+WS4PKrubq3MQx4uTaGOGVBNA=; b=BQ/dVneFEHeEkzCvO2 KGrr731I5QTLtSktV4DXTnJFp8RXH24ma1r1FHMOAGAUyQMY53ox+w8ygmzWnGLq xVWSnYbIXDU/g/xgijCcYjX7aKOKZZ/85y3vqwbIaue/1QleFc7YYy8m+oSAQEEi ydE6I9jVqz+tCv7j1ludSwnXsAy4jrtlPXhpQ7Fd6mAv3dLiVAfnYXW9J9O1tsau 3XRvvzgBTTVMNE61yxC56ywq33yGR1bgoUgC6Z73uCR0XFk2dZiOnkID9IZSaWVj DbGTHBfA6hUC7tl8dzWt+wW09VIVSypktnXDZe7Py3y/yJuDuijFoB0EIIUpjBzi EdsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1679982997; x=1680069397; bh=89ELLowJTnWKS OQuc9+WS4PKrubq3MQx4uTaGOGVBNA=; b=vz7bDCzWsodApSD3xn+pszoerZK4N ZCVP6IK5ikEXGb3+f3jnwUzViq8dX/7tzKRz3wG9375gQ6t8Oxf9wY3ZuG50pvkv 8UwCRbOJx0QVWMFa7RyuhelS5lu+XZuoTBooDsELMjeEbRbWLwDnIjz24QBdhEHS Crdgce7KNEBY9dxQlfJN15iTtu+BQU3OQFMS0UCjNSAqhiGJeMAykskHQEOF45OV KSxgtaNo4QfWb6pTXvNoIgD5B08FqtVBgNpcQFuFc7VkEWW4AI+yZuZ2tXCFSzqd rSrYetZMuCbmSnBrFbY3UA7qaMyJdSqQlmZ7bWNHrdQGKGhdtNXOnx11w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehfedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreer tddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlse hprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteel geeggeffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdig hiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Mar 2023 01:56:34 -0400 (EDT) Date: Tue, 28 Mar 2023 14:56:28 +0900 From: Michael Paquier To: Justin Pryzby Cc: 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: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4CaWdf3ysyRNme/M" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --4CaWdf3ysyRNme/M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 27, 2023 at 11:34:35PM -0500, Justin Pryzby wrote: > I realized that one difference with tablespaces is that, as written, > partitioned tables will *always* have an AM specified, and partitions > will never use default_table_access_method. Is that what's intended ? > > Or do we need logic similar tablespaces, such that the relam of a > partitioned table is set only if it differs from default_table_am ? Hmm. This is a good point. It is true that the patch feels incomplete on this side. I don't see why we could not be flexible, and allow a value of 0 in a partitioned table's relam to mean that we would pick up the database default in this case when a partition is is created on it. This would have the advantage to be consistent with older versions where we fallback on the default. We cannot be completely consistent with the reltablespace of the leaf partitions unfortunately, as relam should always be set if a relation has storage. And allowing a value of 0 means that there are likely other tricky cases with dumps? Another thing: would it make sense to allow an empty string in default_table_access_method so as we'd always fallback to a database default? -- Michael --4CaWdf3ysyRNme/M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQigYwACgkQnvQgOdby QH0OkhAApdtbZ63Lp1zr7dDp+3hB4YD/EGFRQ3wzIBbBXMFjJ0EomjwpJ7WHaqId mAsycCcZn8J11nF8nSfQ//EnF7O6sGhBmjMR7qZouqk21dD2iTPkUrRhBU04tMcU SCUn7QdGFzxR5asxI7UnTaqAypYW2/I8XJZpG8rEO1dqu6txffT281L2u656NTRp QUjbP3FL8tmWhXdLn0qeJ6o7TojevUV1BzcQnL7zSR6V9RPFtVSdNyT612ybu7cq H6wYJS1ToodgEkASbPsSW6KaqnqLBx25BwZmFmCIbdYnEpywYF1e6LqUypmG84O+ NRmj4Qj1SSqY/gWZequyWe+Su2Ig65TqsN50ZgfYsjRtqIKS0SyvwNGfFC5aV72m AmEWOYfDAi3f98otOw9GqdGgwlhETd2pnMTmaoAeq1VSkE3okTDIvcseOwZr9b2C wJrtbxwS5d4uYoHVPWdGIBdOxREKavkvISbCOzp40HDAmUH9MZA8IcCnzuCdDk69 1cEfoZWG+oEXwcMbR6eqCtZGV6EfRP12kfXeCWQk3BPXVar8t0i/xDIGfvAU96F3 qSPFuS6APhTCLN+7VAIqMKwuT/yYkuDc1A8ExyJ85OdOzDWa1YLywIzLxZlBN+Yw FSQXOuSRdu/wPDRmlCKavo/8EJA9kVjUwl8BsuB2A2c7N2P1Qyk= =exCi -----END PGP SIGNATURE----- --4CaWdf3ysyRNme/M--