On Tue, May 25, 2021 at 08:33:47PM -0500, Justin Pryzby wrote: > It reminds me of reltablespace, which is stored as 0 to mean the database's > default tablespace. > > Also, values are currently retoasted during vacuum full if their column's > current compression method doesn't match the value's old compression. > > But it doesn't rewrite the column if the it used to use the default > compression, and the default was changed. I think your idea would handle > that.
Ah, the parallel with reltablespace and default_tablespace at database level is a very good point. It is true that currently the code would assign attcompression to a non-zero value once the relation is defined depending on default_toast_compression set for the database, but setting it to 0 in this case would be really helpful to change the compression methods of all the relations if doing something as crazy as a VACUUM FULL for this database. Count me as convinced. -- Michael
signature.asc
Description: PGP signature