Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org, Dilip Kumar <dilipbalaut@gmail.com>, Robert Haas <robertmhaas@gmail.com>
Date: 2021-05-26T01:57:00Z
Lists: pgsql-hackers
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
Commits
-
Remove forced toast recompression in VACUUM FULL/CLUSTER
- dbab0c07e5ba 14.0 landed
-
Rethink definition of pg_attribute.attcompression.
- e6241d8e030f 14.0 landed
-
Fix memory leak when de-toasting compressed values in VACUUM FULL/CLUSTER
- fb0f5f0172ed 14.0 landed
-
Re-order pg_attribute columns to eliminate some padding space.
- f5024d8d7b04 14.0 landed
-
Add more TAP tests for pg_dump with attribute compression
- 63db0ac3f9e6 14.0 cited