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

From Tomas Vondra
Subject Re: [HACKERS] Custom compression methods
Date
Msg-id bc458704-578f-e824-9d28-3f060d95489a@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Custom compression methods  (Евгений Шишкин <itparanoia@gmail.com>)
Responses Re: [HACKERS] Custom compression methods  (Евгений Шишкин <itparanoia@gmail.com>)
Re: [HACKERS] Custom compression methods  (Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>)
List pgsql-hackers
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).


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Евгений Шишкин
Date:
Subject: Re: [HACKERS] Custom compression methods
Next
From: Ildar Musin
Date:
Subject: IndexTupleDSize macro seems redundant