1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

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
This commit is contained in:
Michael Paquier
2021-06-14 09:25:50 +09:00
parent f807e3410f
commit dbab0c07e5
5 changed files with 6 additions and 66 deletions

View File

@ -394,8 +394,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
values inserted in future will be compressed (if the storage mode
permits compression at all).
This does not cause the table to be rewritten, so existing data may still
be compressed with other compression methods. If the table is rewritten with
<command>VACUUM FULL</command> or <command>CLUSTER</command>, or restored
be compressed with other compression methods. If the table is restored
with <application>pg_restore</application>, then all values are rewritten
with the configured compression method.
However, when data is inserted from another relation (for example,