Per-table storage parameters for TableAM/IndexAM extensions - Mailing list pgsql-hackers

From Sadhuprasad Patro
Subject Per-table storage parameters for TableAM/IndexAM extensions
Date
Msg-id CAFF0-CG4KZHdtYHMsonWiXNzj16gWZpduXAn8yF7pDDub+GQMg@mail.gmail.com
Whole thread Raw
Responses Re: Per-table storage parameters for TableAM/IndexAM extensions  (Dilip Kumar <dilipbalaut@gmail.com>)
Re: Per-table storage parameters for TableAM/IndexAM extensions  (Rushabh Lathia <rushabh.lathia@gmail.com>)
Re: Per-table storage parameters for TableAM/IndexAM extensions  (Jelte Fennema <postgres@jeltef.nl>)
Re: Per-table storage parameters for TableAM/IndexAM extensions  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

Currently all the storage options for a table are very much specific
to the heap but a different AM might need some user defined AM
specific parameters to help tune the AM. So here is a patch which
provides an AM level routine so that instead of getting parameters
validated using “heap_reloptions” it will call the registered AM
routine.

e.g:
-- create a new access method and table using this access method
CREATE ACCESS METHOD myam TYPE TABLE HANDLER <new_tableam_handler>;

CREATE TABLE mytest (a int) USING myam ;

--a new parameter is to set storage parameter for only myam as below
ALTER TABLE mytest(squargle_size = '100MB');

The user-defined parameters will have meaning only for the "myam",
otherwise error will be thrown. Our relcache already allows the
AM-specific cache to be stored for each relation.

Open Question: When a user changes AM, then what should be the
behavior for not supported storage options? Should we drop the options
and go with only system storage options?
Or throw an error, in which case the user has to clean the added parameters.

Thanks & Regards
SadhuPrasad
http://www.EnterpriseDB.com/

Attachment

pgsql-hackers by date:

Previous
From: "Imseih (AWS), Sami"
Date:
Subject: Re: Add index scan progress to pg_stat_progress_vacuum
Next
From: SATYANARAYANA NARLAPURAM
Date:
Subject: Re: Report checkpoint progress in server logs