Re: [HACKERS] Custom compression methods

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, David Steele <david(at)pgmasters(dot)net>, Ildus Kurbangaliev <i(dot)kurbangaliev(at)gmail(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [HACKERS] Custom compression methods
Date: 2021-03-09 09:14:41
Message-ID: CAFiTN-s_fBryp4Tc_Y7YEtD0U--jFfA-sJJEkdwyTk1EQf+PXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 9, 2021 at 1:56 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> With this design, we can support changing the compression method on a
> column quite easily. It's just a hint, like the STORAGE parameter. It
> has no bearing on what can be present in the table, but just controls
> how new values are stored. It would be nice to have a way to force
> anything compressed with the old method to be re-compressed with the
> new method, but not having that doesn't preclude allowing the
> parameter to be changed.

So you mean if we are not able to decompress the old data because the
binary was not compiled with lz4 then don't give error and continue.
I think that depends upon how we are going to support this option for
example suppose we are setting as ALTER COLUMN f1 SET COMPRESSION pglz
REWRITE, then maybe it make sense that even we are not able to rewrite
because it was not compiled with lz4 we can successfully set the new
compression method to pglz.

Another thing is that if the table has some rowtype column then we
will have to process that and decompress any compressed field inside
that right? I haven't yet thought how complex it will be to
decompress the data stored inside an already formed composite type but
I will analyze this.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-03-09 09:18:01 Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]
Previous Message Julien Rouhaud 2021-03-09 09:09:37 Re: Add some tests for pg_stat_statements compatibility verification under contrib