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 1rcRPc-0009WP-5a for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2024 14:48:01 +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 1rcRPa-000EVN-Lf for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2024 14:47:59 +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 1rcRPZ-000EVD-2V for pgsql-hackers@lists.postgresql.org; Tue, 20 Feb 2024 14:47:58 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rcRPV-0001Cz-19 for pgsql-hackers@postgresql.org; Tue, 20 Feb 2024 14:47:56 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id DA5675C00CA; Tue, 20 Feb 2024 09:47:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 20 Feb 2024 09:47:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1708440470; x=1708526870; bh=D9t3ktu1Jdhv0y5YXHmtx2h6wiTStUAH MtuzgxvTnr4=; b=ahnr/1EZLkkuw41pR7gH8Tw29gBmgt3gxEi8eRP3Un6Us4He B7kz5eApX9bl5wUF614T1u2IHhz8GLQIoo3eibBx0RcJTLHmJTpExpO2HvJPB3wO 1c9y70KQ18Bd6RQxh9I76b972wkBKN4Z03GsSK/kkxOgoW8GfPUQOdxyDf4dnQ0i iNPK/cqp8arRvHGVriFUUQuxiC1i2ml2KjnNCvOWhHQ8Jb2iKXTyrZmg6dWM/D/Q tVwXqhrdsPtcmaRU2uNoVqzyvoNpt9uJx1NfjhrVzw30jMnhwCpJryhEy0OjJGy+ 9TgQUt49yKly+OUhd91RrUp818V4lbkLQl8Ksw== 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 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708440470; x= 1708526870; bh=D9t3ktu1Jdhv0y5YXHmtx2h6wiTStUAHMtuzgxvTnr4=; b=W 1y69JhPp4lg8xr9LrPaTZ6AY3vh7p5Xvkt+4qdJZPm4/vxPFFmf8Q4wS9kfS+UOx Qhkm8zoBEGav6mLHTrKmFhRbWgMNPy9meisxMoQP2WE5gA7h7X/xcQUv5dbKgCn1 pVOe9c1B+Q51Fttc924mbSFQUIxWlTT37f6HFThF/Gc1dmDfEc/srJcDt+cUDmOX odZ/MFo4McKNO6fq304ktBIP+IjqKceGxFI17hwooPqlMgDWGbA1OXoqV42RxB9y 2uIGLtbXD2YjBPTEI05owl8PR9nCbV0mLm7XARqlc8hArjamiYFuYTX4IMWO3J2/ 7SJuaCXnyiKXIf1GU7/LQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedtgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqe enucggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueet vdffudekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Feb 2024 09:47:49 -0500 (EST) Message-ID: Date: Tue, 20 Feb 2024 15:47:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables Content-Language: en-US To: Justin Pryzby , Michael Paquier Cc: Soumyadeep Chakraborty , Zhihong Yu , pgsql-hackers@postgresql.org, Ashwin Agrawal , vanjared@vmware.com References: From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 19.07.23 20:13, Justin Pryzby wrote: > On Thu, Jun 01, 2023 at 08:50:50AM -0400, Michael Paquier wrote: >> On Wed, May 31, 2023 at 06:35:34PM -0500, Justin Pryzby wrote: >>> What do you think the comment ought to say ? It already says: >>> >>> src/backend/catalog/heap.c- * Make a dependency link to force the relation to be deleted if its >>> src/backend/catalog/heap.c- * access method is. >> >> This is the third location where we rely on the fact that >> RELKIND_HAS_TABLE_AM() does not include RELKIND_PARTITIONED_TABLE, so >> it seems worth documenting what we are relying on as a comment? Say: >> * Make a dependency link to force the relation to be deleted if its >> * access method is. >> * >> * No need to add an explicit dependency for the toast table, as the >> * main table depends on it. Partitioned tables have a table access >> * method defined, and RELKIND_HAS_TABLE_AM ignores them. > > You said that this location "relies on" the macro not including > partitioned tables, but I would say the opposite: the places that use > RELKIND_HAS_TABLE_AM() and do *not* say "or relkind==PARTITIONED_TABLE" > are the ones that "rely on" that... > > Anyway, this updates various comments. No other changes. It would be helpful if this patch could more extensively document in its commit message what semantic changes it makes. Various options of possible behaviors were discussed in this thread, but it's not clear which behaviors were chosen in this particular patch version. The general idea is that you can set an access method on a partitioned table. That much seems very agreeable. But then what happens with this setting, how can you override it, how can you change it, what happens when you change it, what happens with existing partitions and new partitions, etc. -- and which of these behaviors are new and old. Many things to specify.