Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...
Date
Msg-id 13864.963006972@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...  (JanWieck@t-online.de (Jan Wieck))
Responses Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...  (JanWieck@t-online.de (Jan Wieck))
List pgsql-hackers
JanWieck@t-online.de (Jan Wieck) writes:
> eisentrp@csis.gvsu.edu wrote:
>> Maybe you just want to use zlib. Let other guys hammer out the details.

>     We  cannot  assume that zlib is available everywhere.

We can if we include it in our distribution --- which we could; it's
pretty small and uses a BSD-style license.  I can assure you the zlib
guys would be happy with that.  And it's certainly as portable as our
own code.  The real question is, is a custom compressor enough better
than zlib for our purposes to make it worth taking any patent risks?

We could run zlib at a low compression setting (-z1 to -z3 maybe)
to make compression relatively fast, and since that also doesn't
generate a custom Huffman tree, the overhead in the compressed data
is minor even for short strings.  And its memory footprint is
certainly no worse than Jan's method...

The real question is whether zlib decompression is markedly slower
than Jan's code.  Certainly Jan's method is a lot simpler and *should*
be faster --- but on the other hand, zlib has had a heck of a lot
of careful performance tuning put into it over the years.  The speed
difference might not be as bad as all that.

I think it's worth taking a look at the option.
        regards, tom lane


pgsql-hackers by date:

Previous
From: JanWieck@t-online.de (Jan Wieck)
Date:
Subject: Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...
Next
From: Tom Lane
Date:
Subject: Re: fcntl(SETLK) [was Re: 2nd update on TOAST]