Re: How to force "re-TOAST" after changing STORAGE or COMPRESSION? - Mailing list pgsql-general

From Michael Paquier
Subject Re: How to force "re-TOAST" after changing STORAGE or COMPRESSION?
Date
Msg-id ZRu_gO-lg_Ya1HPe@paquier.xyz
Whole thread Raw
In response to Re: How to force "re-TOAST" after changing STORAGE or COMPRESSION?  (Dominique Devienne <ddevienne@gmail.com>)
List pgsql-general
On Tue, Oct 03, 2023 at 09:08:49AM +0200, Dominique Devienne wrote:
>  In my case, it's OK not to be transactional, for these experiments. Is
> there a way
> to lock the table and do the rewriting w/o generating any WAL? I don't have
> any experience
> with unlogged tables, but should I take an exclusive lock on the table,
> switch it to unlogged,
> rewrite, and switch it back to logged?

Switching a table back to be logged requires all its 8k blocks to be
WAL-logged, so that would be roughly the same as a plain UPDATE.
--
Michael

Attachment

pgsql-general by date:

Previous
From: Dominique Devienne
Date:
Subject: Re: How to force "re-TOAST" after changing STORAGE or COMPRESSION?
Next
From: Laurenz Albe
Date:
Subject: Re: How to force "re-TOAST" after changing STORAGE or COMPRESSION?