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 1uJVf1-000u7H-UB for pgsql-hackers@arkaria.postgresql.org; Mon, 26 May 2025 11:06:28 +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 1uJVf0-000yrJ-Bf for pgsql-hackers@arkaria.postgresql.org; Mon, 26 May 2025 11:06:26 +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 1uJVez-000yqe-OO for pgsql-hackers@lists.postgresql.org; Mon, 26 May 2025 11:06:26 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uJVeu-000BH7-1t for pgsql-hackers@postgresql.org; Mon, 26 May 2025 11:06:24 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id D623E43979 for ; Mon, 26 May 2025 11:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tachoires.me; s=gm1; t=1748257580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QUri3otjq33MFDYvH+0ZT5DDMX+KSjDq8FHVzGqL3ok=; b=F8A0i3B3k8GpqmWRRel7v5/XAn0XQkmIvHOV9pYdi35pCIkDiv7MshNrnp64iNJ0OQfAJF 7Bz+0iZOY0ST+XxvPPP3MU68YCT88p2BwdOpWdHkFOa+ZJo4IQU7zfwwGPIEJNCvH/FbE2 qKbWpI7AsWhf8NukRMSCoacgBp57sHbqCeROTo7hPrf9kCjphiWoz8EetwDhYBbb8XslRZ 5+xflEQv7js6RmLe1iYaEfb53KjuogCRMclSeC9NscwZpY/2gEj22sjUp4na4FJ5I10Gvj Js+sLltrSV46JhqfZoSf7p7p9Aqi2k6dm+CHiYwEYKwegFPhPE6Iekjbg60mvQ== Date: Mon, 26 May 2025 13:06:19 +0200 From: Julien Tachoires To: pgsql-hackers Subject: Re: Allow table AMs to define their own reloptions Message-ID: <20250526110619.oepaf5dbzq3hjuij@poseidon.home.virt> References: <20250302085641.hmjom5ru3w554t2n@poseidon.home.virt> <20250302132354.ffbfokeq36dp2kss@poseidon.home.virt> <20250329074601.3zgrsozvycthucir@poseidon.home.virt> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="kp2yjslz3dxnr4ia" Content-Disposition: inline In-Reply-To: <20250329074601.3zgrsozvycthucir@poseidon.home.virt> X-GND-State: clean X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddujeefieculddtuddrgeefvddrtddtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucenucfjughrpeffhffvuffkfhggtggujgesmhdtreertddtvdenucfhrhhomheplfhulhhivghnucfvrggthhhoihhrvghsuceojhhulhhivghnsehtrggthhhoihhrvghsrdhmvgeqnecuggftrfgrthhtvghrnhepgfdvvdehheethefgtdeitdehudejhfetgeduleekuedtgfekkeffieduudetjeevnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepvdgrtddumegtsgduleemsgdttdemsggrtddtmedujedufeemkehfiegrmedvvgeljeemrghfudegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegtsgduleemsgdttdemsggrtddtmedujedufeemkehfiegrmedvvgeljeemrghfudegpdhhvghlohepphhoshgvihguohhnrdhhohhmvgdrvhhirhhtpdhmrghilhhfrhhomhepjhhulhhivghnsehtrggthhhoihhrvghsrdhmvgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-GND-Sasl: julien@tachoires.me List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --kp2yjslz3dxnr4ia Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Mar 29, 2025 at 08:46:01AM +0100, Julien Tachoires wrote: > On Sun, Mar 02, 2025 at 02:23:54PM +0100, Julien Tachoires wrote: > > On Sun, Mar 02, 2025 at 09:56:41AM +0100, Julien Tachoires wrote: > > > With the help of the new TAM routine 'relation_options', table access > > > methods can with this patch define their own reloptions > > > parser/validator. > > > > > > These reloptions can be set via the following commands: > > > 1. CREATE TABLE ... USING table_am > > > WITH (option1='value1', option2='value2'); > > > 2. ALTER TABLE ... > > > SET (option1 'value1', option2 'value2'); > > > 3. ALTER TABLE ... SET ACCESS METHOD table_am > > > OPTIONS (option1 'value1', option2 'value2'); > > > > > > When changing table's access method, the settings inherited from the > > > former TAM can be dropped (if not supported by the new TAM) via: DROP > > > option, or, updated via: SET option 'value'. > > > > > > Currently, tables using different TAMs than heap are able to use heap's > > > reloptions (fillfactor, toast_tuple_target, etc...). With this patch > > > applied, this is not the case anymore: if the TAM needs to have access > > > to similar settings to heap ones, they have to explicitly define them. > > > > > > The 2nd patch file includes a new test module 'dummy_table_am' which > > > implements a dummy table access method utilized to exercise TAM > > > reloptions. This test module is strongly based on what we already have > > > in 'dummy_index_am'. 'dummy_table_am' provides a complete example of TAM > > > reloptions definition. > > > > > > This work is directly derived from SadhuPrasad's patch here [2]. Others > > > attempts were posted here [1] and here [3]. > > > > > > [1] https://www.postgresql.org/message-id/flat/429fb58fa3218221bb17c7bf9e70e1aa6cfc6b5d.camel%40j-davis.com > > > [2] https://www.postgresql.org/message-id/flat/CAFF0-CG4KZHdtYHMsonWiXNzj16gWZpduXAn8yF7pDDub+GQMg@mail.gmail.com > > > [3] https://www.postgresql.org/message-id/flat/AMUA1wBBBxfc3tKRLLdU64rb.1.1683276279979.Hmail.wuhao%40hashdata.cn > > > > Please find a new version including minor fixes: 'TAM' terms are > > replaced by 'table AM' > > Please find a new rebased version. New rebased version. -- Julien Tachoires --kp2yjslz3dxnr4ia Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v4-0001-Allow-table-AMs-to-define-their-own-reloptions.patch"