Re: change default default_toast_compression to lz4?

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "Michael Paquier" <michael(at)paquier(dot)xyz>, "Peter Eisentraut" <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: change default default_toast_compression to lz4?
Date: 2025-11-26 18:59:37
Message-ID: c822b84c-b104-4fb4-92f3-3008cce50bf9@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 26, 2025, at 1:35 AM, Michael Paquier wrote:
> On Fri, Nov 21, 2025 at 12:11:38PM +0100, Peter Eisentraut wrote:
>> 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.
>
> +1. That makes sense here to flip the default depending on what the
> code is built with, with lz4 if available, pglz otherwise.
>

Since we have an agreement that $SUBJECT is ok, I wrote a patch for it. It
selects the compression method based on USE_LZ4. It also adjusts the
postgresql.conf if required.

--
Euler Taveira
EDB https://www.enterprisedb.com/

Attachment Content-Type Size
v1-0001-Change-default_toast_compression-to-lz4.patch text/x-patch 3.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2025-11-26 19:15:27 Re: System views for versions reporting
Previous Message Álvaro Herrera 2025-11-26 18:34:16 Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY