Remove forced toast recompression in VACUUM FULL/CLUSTER
authorMichael Paquier <michael@paquier.xyz>
Mon, 14 Jun 2021 00:25:50 +0000 (09:25 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 14 Jun 2021 00:25:50 +0000 (09:25 +0900)
commitdbab0c07e5ba1f19a991da2d72972a8fe9a41bda
treec7f82e991f2aec0b137d3b5e2dab9a7a1c32ad03
parentf807e3410fdfc29ced6590c7c2afa76637e001ad
Remove forced toast recompression in VACUUM FULL/CLUSTER

The extra checks added by the recompression of toast data introduced in
bbe0a81 is proving to have a performance impact on VACUUM or CLUSTER
even if no recompression is done.  This is more noticeable with more
toastable columns that contain non-NULL values.

Improvements could be done to make those extra checks less expensive,
but that's not material for 14 at this stage, and we are not sure either
if the code path of VACUUM FULL/CLUSTER is adapted for this job.

Per discussion with several people, including Andres Freund, Robert
Haas, Álvaro Herrera, Tom Lane and myself.

Discussion: https://postgr.es/m/20210527003144.xxqppojoiwurc2iz@alap3.anarazel.de
doc/src/sgml/ref/alter_table.sgml
src/backend/access/heap/heapam_handler.c
src/test/regress/expected/compression.out
src/test/regress/expected/compression_1.out
src/test/regress/sql/compression.sql