pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Евгений Шишкин <itparanoia@gmail.com>
Cc: Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
Cc: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Oleg Bartunov <obartunov@gmail.com>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Custom compression methods
Date: Mon, 20 Nov 2017 16:29:11 +0100
Message-ID: <bc458704-578f-e824-9d28-3f060d95489a@2ndquadrant.com> (raw)
In-Reply-To: <321450D5-FFDE-46A6-B10B-26B5E0D3BF49@gmail.com>
References: <20170907194236.4cefce96@wp.localdomain>
	<20170912175505.4afa11fd@wp.localdomain>
	<5c84382f-1065-e9e8-dde8-4c1f5ae1007b@2ndquadrant.com>
	<20171102124101.5a28ecab@wp.localdomain>
	<CAMsr+YGm0z5571OmwyPaq94A03MaTfJq4PfR-r=uUpuidSTjeA@mail.gmail.com>
	<CAF4Au4zp-S1srXbQD5XKHFaOky+vVY5dPAUgCi8Ziyp9sTTRWg@mail.gmail.com>
	<CA+TgmoZZYX-knZoTojo-dTbTvmRw8fzFQzH=MXs9GDN3m9-QeQ@mail.gmail.com>
	<20171115120928.31bee414@wp.localdomain>
	<CA+TgmoachY0-FjthGkpEDTswt3i7h1xfMzjow25d5NNuvaaw7g@mail.gmail.com>
	<e13abfa9-658d-8bef-4a69-68ed4ea34ee9@2ndquadrant.com>
	<20171120124428.6154f23f@wp.localdomain>
	<58471b21-2f8c-9fa9-63ca-4c37883b8307@2ndquadrant.com>
	<321450D5-FFDE-46A6-B10B-26B5E0D3BF49@gmail.com>


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




view thread (430+ messages)  latest in thread

Message-ID: <bc458704-578f-e824-9d28-3f060d95489a@2ndquadrant.com>
Permalink:  ../bc458704-578f-e824-9d28-3f060d95489a@2ndquadrant.com/
Also on:    postgresql.org/message-id/bc458704-578f-e824-9d28-3f060d95489a@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, itparanoia@gmail.com, i.kurbangaliev@postgrespro.ru, andres@anarazel.de, robertmhaas@gmail.com, obartunov@gmail.com, craig@2ndquadrant.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: [HACKERS] Custom compression methods
  In-Reply-To: <bc458704-578f-e824-9d28-3f060d95489a@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox