Re: [HACKERS] Custom compression methods - Mailing list pgsql-hackers

From Ildus Kurbangaliev
Subject Re: [HACKERS] Custom compression methods
Date
Msg-id 20171120184435.13698aee@wp.localdomain
Whole thread Raw
In response to Re: [HACKERS] Custom compression methods  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: [HACKERS] Custom compression methods
List pgsql-hackers
On Mon, 20 Nov 2017 16:29:11 +0100
Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:

> On 11/20/2017 04:21 PM, Евгений Шишкин wrote:
> >
> >
> >> On Nov 20, 2017, at 18:18, Tomas Vondra
> >> <tomas.vondra@2ndquadrant.com
> >> <mailto:tomas.vondra@2ndquadrant.com>> wrote:
> >>
> >>
> >> I don't think we need to do anything smart here - it should behave
> >> just like dropping a data type, for example. That is, error out if
> >> there are columns using the compression method (without CASCADE),
> >> and drop all the columns (with CASCADE).
> >
> > What about instead of dropping column we leave data uncompressed?
> >
>
> That requires you to go through the data and rewrite the whole table.
> And I'm not aware of a DROP command doing that, instead they just drop
> the dependent objects (e.g. DROP TYPE, ...). So per PLOS the DROP
> COMPRESSION METHOD command should do that too.
>
> But I'm wondering if ALTER COLUMN ... SET NOT COMPRESSED should do
> that (currently it only disables compression for new data).

If the table is big, decompression could take an eternity. That's why i
decided to only to disable it and the data could be decompressed using
compression options.

My idea was to keep compression options forever, since there will not
be much of them in one database. Still that requires that extension is
not removed.

I will try to find a way how to recompress data first in case it moves
to another table.

--
---
Ildus Kurbangaliev
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


pgsql-hackers by date:

Previous
From: Евгений Шишкин
Date:
Subject: Re: [HACKERS] Custom compression methods
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] [WIP] Zipfian distribution in pgbench