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

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Sadhuprasad Patro <b(dot)sadhu(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-17 04:49:13
Message-ID: CAFiTN-vFyGyqTMC23yaYff-jY=NU0MymwMcPsWg1CSgEn1JRCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.
>

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-02-17 05:16:47 Re: BufferAlloc: don't take two simultaneous locks
Previous Message Michael Paquier 2022-02-17 04:34:08 Re: adding 'zstd' as a compression algorithm