Skip to content

Commit 2d0f662

Browse files
committed
docs: Clarify how ALTER TABLE .. SET COMPRESSION works.
Justin Pryzby, per a complaint from Michael Paquier. Reviewed by Dilip Kumar and by me. Discussion: http://postgr.es/m/20210429040132.GF27406@telsasoft.com
1 parent 592f00f commit 2d0f662

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

doc/src/sgml/ref/alter_table.sgml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,21 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
391391
</term>
392392
<listitem>
393393
<para>
394-
This sets the compression method for a column. The supported compression
394+
This sets the compression method to be used for data inserted into a column.
395+
396+
This does not cause the table to be rewritten, so existing data may still
397+
be compressed with other compression methods. If the table is rewritten with
398+
<command>VACUUM FULL</command> or <command>CLUSTER</command>, or restored
399+
with <application>pg_restore</application>, then all tuples are rewritten
400+
with the configured compression methods.
401+
402+
Also, note that when data is inserted from another relation (for example,
403+
by <command>INSERT ... SELECT</command>), tuples from the source data are
404+
not necessarily detoasted, and any previously compressed data is retained
405+
with its existing compression method, rather than recompressing with the
406+
compression methods of the target columns.
407+
408+
The supported compression
395409
methods are <literal>pglz</literal> and <literal>lz4</literal>.
396410
<literal>lz4</literal> is available only if <literal>--with-lz4</literal>
397411
was used when building <productname>PostgreSQL</productname>.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy