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

From Michael Paquier
Subject Re: Force re-compression with lz4
Date
Msg-id YW0jBhWs5sQRNbZV@paquier.xyz
Whole thread Raw
In response to Re: Force re-compression with lz4  (Florents Tselai <florents.tselai@gmail.com>)
List pgsql-general
On Mon, Oct 18, 2021 at 09:57:11AM +0300, Florents Tselai wrote:
> Oh, that’s good to know then. So besides ALTER COMPRESSION for
> future inserts there’s not much one can do for pre-existing values

The posting style of the mailing list is to not top-post, so if you
could avoid breaking the logic of the thread, that would be nice :)

> I think it makes sense to update/ add more info to the docs on this
> as well, since other people in the thread expected this to work that
> way too.

There is some documentation, as changing the compression for an
existing table is part of ALTER TABLE:
https://www.postgresql.org/docs/current/sql-altertable.html

"This does not cause the table to be rewritten, so existing data may
still be compressed with other compression methods. If the table is
restored with pg_restore, then all values are rewritten with the
configured compression method."

> Maybe at some point, even allow an explicit option to be defined during VACUUM ?

That's a part where we disagreed as it should not be VACUUM's work to
do that.  The option would have a limited impact as it comes to users
that would do a one-time operation most likely part of an upgrade, so
I don't think that this would be adapted to have anyway.
--
Michael

Attachment

pgsql-general by date:

Previous
From: Florents Tselai
Date:
Subject: Re: Force re-compression with lz4
Next
From: Magnus Hagander
Date:
Subject: Re: Force re-compression with lz4