Re: [HACKERS] Custom compression methods

From: Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>
To: Ildar Musin <i(dot)musin(at)postgrespro(dot)ru>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Евгений Шишкин <itparanoia(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Oleg Bartunov <obartunov(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Chapman Flack <chap(at)anastigmatix(dot)net>
Subject: Re: [HACKERS] Custom compression methods
Date: 2018-01-23 13:04:54
Message-ID: 20180123160454.131ade09@wp.localdomain
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Mon, 22 Jan 2018 23:26:31 +0300
Ildar Musin <i(dot)musin(at)postgrespro(dot)ru> wrote:

Thanks for review! Attached new version of the patch. Fixed few bugs,
added more documentation and rebased to current master.

> You need to rebase to the latest master, there are some conflicts.
> I've applied it to the three days old master to try it.

Done.

>
> As I can see the documentation is not yet complete. For example, there
> is no section for ALTER COLUMN ... SET COMPRESSION in ddl.sgml; and
> section "Compression Access Method Functions" in compression-am.sgml
> hasn't been finished.

Not sure about ddl.sgml, it contains more common things, but since
postgres contains only pglz by default there is not much to show.

>
> I've implemented an extension [1] to understand the way developer
> would go to work with new infrastructure. And for me it seems clear.
> (Except that it took me some effort to wrap my mind around varlena
> macros but it is probably a different topic).
>
> I noticed that you haven't cover 'cmdrop' in the regression tests and
> I saw the previous discussion about it. Have you considered using
> event triggers to handle the drop of column compression instead of
> 'cmdrop' function? This way you would kill two birds with one stone:
> it still provides sufficient infrastructure to catch those events
> (and it something postgres already has for different kinds of ddl
> commands) and it would be easier to test.

I have added support for event triggers for ALTER SET COMPRESSION in
current version. Event trigger on ALTER can be used to replace cmdrop
function but it will be far from trivial. There is not easy way to
understand that's attribute compression is really dropping in the
command.

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

Attachment Content-Type Size
custom_compression_methods_v9.patch text/x-patch 322.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Glukhov 2018-01-23 13:18:14 Re: jsonpath
Previous Message Marco Nenciarini 2018-01-23 12:34:11 Re: [PATCH] session_replication_role = replica with TRUNCATE