From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Custom compression methods |
Date: | 2017-12-14 15:25:34 |
Message-ID: | CA+TgmoYzht_2g8bqwXGB24c24wjvJuOBTkgVhXKhi83OS18GQQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Dec 13, 2017 at 1:34 PM, Tomas Vondra
<tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
> Wouldn't that require some universal compression level, shared by all
> supported compression algorithms? I don't think there is such thing.
>
> Defining it should not be extremely difficult, although I'm sure there
> will be some cumbersome cases. For example what if an algorithm "a"
> supports compression levels 0-10, and algorithm "b" only supports 0-3?
>
> You may define 11 "universal" compression levels, and map the four
> levels for "b" to that (how). But then everyone has to understand how
> that "universal" mapping is defined.
What we could do is use the "namespace" feature of reloptions to
distinguish options for the column itself from options for the
compression algorithm. Currently namespaces are used only to allow
you to configure toast.whatever = somevalue, but we could let you say
pglz.something = somevalue or lz4.whatever = somevalue. Or maybe, to
avoid confusion -- what happens if somebody invents a compression
method called toast? -- we should do it as compress.lz4.whatever =
somevalue. I think this takes us a bit far afield from the core
purpose of this patch and should be a separate patch at a later time,
but I think it would be cool.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-12-14 15:29:10 | Re: [HACKERS] Custom compression methods |
Previous Message | Merlin Moncure | 2017-12-14 15:22:24 | Re: procedures and plpgsql PERFORM |