Re: Table and Index compression - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Table and Index compression
Date
Msg-id 407d949e0908070349r43cb0ecbrdeb3b22d70b178db@mail.gmail.com
Whole thread Raw
In response to Re: Table and Index compression  (Sam Mason <sam@samason.me.uk>)
Responses Re: Table and Index compression  (Pierre Frédéric Caillaud<lists@peufeu.com>)
Re: Table and Index compression  (Sam Mason <sam@samason.me.uk>)
List pgsql-hackers
On Fri, Aug 7, 2009 at 11:29 AM, Sam Mason<sam@samason.me.uk> wrote:
> When you choose a compression algorithm you know how much space a worst
> case compression will take (i.e. lzo takes up to 8% more for a 4kB block
> size).  This space should be reserved in case of situations like the
> above and the filesystem shouldn't over-commit on this.
>
> Never had to think about this before though so I'm probably missing
> something obvious.

Well most users want compression for the space savings. So running out
of space sooner than without compression when most of the space is
actually unused would disappoint them.

Also, I'm puzzled why it would the space increase would proportional
to the amount of data and be more than 300 bytes. There's no reason it
wouldn't be a small fixed amount. The ideal is you set aside one bit
-- if the bit is set the rest is compressed and has to save at least
one bit. If the bit is not set then the rest is uncompressed. Maximum
bloat is 1-bit. In real systems it's more likely to be a byte or a
word.

--
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Sam Mason
Date:
Subject: Re: Table and Index compression
Next
From: Michael Meskes
Date:
Subject: Re: Split-up ECPG patches