Re: Per-table storage parameters for TableAM/IndexAM extensions

From: Sadhuprasad Patro <b(dot)sadhu(at)gmail(dot)com>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Per-table storage parameters for TableAM/IndexAM extensions
Date: 2022-02-24 06:56:08
Message-ID: CAFF0-CHPcDzM5BjcOAq+zQ=Y+afAetA8A_Wbt5gUEh7PdKV3bA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 18, 2022 at 10:48 PM Simon Riggs
<simon(dot)riggs(at)enterprisedb(dot)com> wrote:
>
> On Thu, 17 Feb 2022 at 17:55, Sadhuprasad Patro <b(dot)sadhu(at)gmail(dot)com> wrote:
> >
> > > On Sat, Feb 12, 2022 at 2:35 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > >>
> > >>
> > >> Imagine that I am using the "foo" tableam with "compression=lots" and
> > >> I want to switch to the "bar" AM which does not support that option.
> > >> If I remove the "compression=lots" option using a separate command,
> > >> the "foo" table AM may rewrite my whole table and decompress
> > >> everything. Then when I convert to the "bar" AM it's going to have to
> > >> be rewritten again. That's painful. I clearly need some way to switch
> > >> AMs without having to rewrite the table twice.
> > >
> > Agreed. Better to avoid multiple rewrites here. Thank you for figuring out this.
> >
> >
> > > You'd need to be able to do multiple things with one command e.g.
> >
> > > ALTER TABLE mytab SET ACCESS METHOD baz RESET compression, SET
> > > preferred_fruit = 'banana';
> >
> > +1
> > Silently dropping some options is not right and it may confuse users
> > too. So I would like to go
> > for the command you have suggested, where the user should be able to
> > SET & RESET multiple
> > options in a single command for an object.
>
> I prefer ADD/DROP to SET/RESET. The latter doesn't convey the meaning
> accurately to me.

I have added a dummy test module for table AM and did the document
change in the latest patch attached...
The Next plan is to provide users to change the AM storage parameters
swiftly through a single command. I will work on the same and give
another version.

As of now I will go with the ADD/DROP keywords for "ALTER TABLE" command.

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

Attachment Content-Type Size
v3-0001-PATCH-V3-Per-table-storage-parameters-for-TableAM.patch application/octet-stream 32.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-02-24 07:05:17 Re: speed up a logical replica setup
Previous Message Michael Paquier 2022-02-24 06:32:55 Re: pg_stat_get_replication_slot and pg_stat_get_subscription_worker incorrectly marked as proretset