public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aleksander Alekseev <[email protected]>
To: pgsql-hackers <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Subject: Re: change default default_toast_compression to lz4?
Date: Fri, 21 Nov 2025 14:33:38 +0300
Message-ID: <CAJ7c6TPC4F9WgaJqcsnGL-cjn7CCopLRew6s9ShNox010G03ug@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Hi Peter,

> How about changing the default of default_toast_compression to lz4?

To me it sounds like a great idea.

> I have seen cases where servers had performance problems and were
> CPU-bound because of pglz TOAST compression, and changing it to lz4
> relieved it significantly.  I suspect many users are leaving easy
> performance improvements on the table by not using this option.
>
> The feature was introduced in PostgreSQL 14, so it should be well
> stabilized now.
>
> I suppose one issue is that lz4 support is not compiled-in by default,
> but in practice most users will have it.  The default could be lz4 if
> lz4 support is built, otherwise pglz.  This would be similar to other
> parameters where the default is the best one depending on the build
> configuration.

Are there good reasons why we can't simply make lz4 a required
dependency? In the worst case we could simply copy its implementation,
the license permits.

-- 
Best regards,
Aleksander Alekseev





view thread (13+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: change default default_toast_compression to lz4?
  In-Reply-To: <CAJ7c6TPC4F9WgaJqcsnGL-cjn7CCopLRew6s9ShNox010G03ug@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox