Allow GiST opcalsses without compress\decompres functions

From: Andrew Borodin <borodin(at)octonica(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Allow GiST opcalsses without compress\decompres functions
Date: 2017-05-25 11:31:04
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

Hi, hackers!

Currently, GiST stores each attribute in a compressed form.
That is, each time attribute is written it's calling compress
function, and when the attribute is accessed the decompress functions
is called.
Some types can't get any advantage out of this technique since the
context of one value is not enough for seeding effective compression
And we have some of the compress functions like this

Maybe we should make compress\decompress functions optional?
Also, this brings some bit of performance.
For the attached test I observe 6% faster GiST build and 4% faster scans.
Not a big deal, but something. How do you think?

In some cases, there are strange things in the code of
compress\decompress. E.g. cube's decompress function is detoasting
entry twice, to be very sure :)

Best regards, Andrey Borodin, Octonica.

Attachment Content-Type Size
testuncompressed.sql text/plain 2.0 KB
0001-Allow-uncompressed-GiST.patch application/octet-stream 3.1 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Sokolov Yura 2017-05-25 12:22:03 Fix performance of generic atomics
Previous Message tushar 2017-05-25 11:15:07 Re: Alter subscription..SET - NOTICE message is coming for table which is already removed