Re: Zedstore - compressed in-core columnar storage

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Zedstore - compressed in-core columnar storage
Дата
Msg-id d4bfe7b0-0836-06b1-6b03-f5874b5a2b00@iki.fi
обсуждение исходный текст
Ответ на Re: Zedstore - compressed in-core columnar storage  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Zedstore - compressed in-core columnar storage  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
On 11/04/2019 17:54, Tom Lane wrote:
> Ashwin Agrawal <aagrawal@pivotal.io> writes:
>> Thank you for trying it out. Yes, noticed for certain patterns pg_lzcompress() actually requires much larger output
buffers.Like for one 86 len source it required 2296 len output buffer. Current zedstore code doesn’t handle this case
anderrors out. LZ4 for same patterns works fine, would highly recommend using LZ4 only, as anyways speed is very fast
aswell with it.
 
> 
> You realize of course that *every* compression method has some inputs that
> it makes bigger.  If your code assumes that compression always produces a
> smaller string, that's a bug in your code, not the compression algorithm.

Of course. The code is not making that assumption, although clearly 
there is a bug there somewhere because it throws that error. It's early 
days..

In practice it's easy to weasel out of that, by storing the data 
uncompressed, if compression would make it longer. Then you need an 
extra flag somewhere to indicate whether it's compressed or not. It 
doesn't break the theoretical limit because the actual stored length is 
then original length + 1 bit, but it's usually not hard to find a place 
for one extra bit.

- Heikki



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeevan Chalke
Дата:
Сообщение: cache lookup failed for collation 0
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_dump is broken for partition tablespaces