Re: Force re-compression with lz4 - Mailing list pgsql-general

From Daniel Verite
Subject Re: Force re-compression with lz4
Date
Msg-id ca86c828-15a9-4818-a559-27b29263c38e@manitou-mail.org
Whole thread Raw
In response to Force re-compression with lz4  (Florents Tselai <florents.tselai@gmail.com>)
List pgsql-general
    Florents Tselai wrote:

> I have a table storing mostly text data (40M+ rows) that has
> pg_total_relation_size ~670GB.
> I’ve just upgraded to postgres 14 and I’m now eager to try the new LZ4
> compression.

You could start experimenting with data samples rather than the
full contents.

FWIW, in my case I've found that the compression ratio of lz4 was only
marginally better than pglz (like 2% on text).
As for decompression time, it doesn't seem to differ significantly
from pglz, so overall, recompressing existing data did not seem
worth the trouble.

However lz4 appears to be much faster to compress than pglz, so its
benefit is clear in terms of CPU usage for future insertions.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: https://www.manitou-mail.org
Twitter: @DanielVerite



pgsql-general by date:

Previous
From: Florents Tselai
Date:
Subject: Re: Force re-compression with lz4
Next
From: Michael Paquier
Date:
Subject: Re: Force re-compression with lz4