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

From Dilip Kumar
Subject Re: Per-table storage parameters for TableAM/IndexAM extensions
Date
Msg-id CAFiTN-vFyGyqTMC23yaYff-jY=NU0MymwMcPsWg1CSgEn1JRCw@mail.gmail.com
Whole thread Raw
In response to Re: Per-table storage parameters for TableAM/IndexAM extensions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Per-table storage parameters for TableAM/IndexAM extensions  (Sadhuprasad Patro <b.sadhu@gmail.com>)
List pgsql-hackers
On Sat, Feb 12, 2022 at 2:35 AM Robert Haas <robertmhaas@gmail.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.

I agree with you, if we force users to drop the option as a separate command then we will have to rewrite the table twice.
 
It's also interesting to consider the other direction. If I am
switching from "bar" to "foo" I would really like to be able to add
the "compression=lots" option at the same time I make the switch.
There needs to be some syntax for that.

One way to solve the first of these problem is to silently drop
unsupported options. Maybe a better way is to have syntax that allows
you to specify options to be added and removed at the time you switch
AMs e.g.:

+1


--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: adding 'zstd' as a compression algorithm
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: BufferAlloc: don't take two simultaneous locks