Re: Force re-compression with lz4

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Florents Tselai" <florents(dot)tselai(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Force re-compression with lz4
Date: 2021-10-17 20:33:52
Message-ID: ca86c828-15a9-4818-a559-27b29263c38e@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2021-10-18 05:07:40 Re: Force re-compression with lz4
Previous Message Florents Tselai 2021-10-17 19:13:48 Re: Force re-compression with lz4