Re: Small issues with CREATE TABLE COMPRESSION
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Michael Paquier <michael@paquier.xyz>, Postgres hackers <pgsql-hackers@lists.postgresql.org>,
Jacob Champion <pchampion@vmware.com>, Robert Haas <robertmhaas@gmail.com>
Date: 2021-05-05T05:13:11Z
Lists: pgsql-hackers
On Thu, Apr 29, 2021 at 9:31 AM Justin Pryzby <pryzby@telsasoft.com> wrote: > > On Tue, Apr 27, 2021 at 03:22:25PM +0900, Michael Paquier wrote: > > Hi all, > > > And so, ALTER MATERIALIZED VIEW supports SET COMPRESSION but this is > > not mentioned in its docs: > > https://www.postgresql.org/docs/devel/sql-altermaterializedview.html > > > > psql could have tab completion support for that. > > Actually ALTER matview ALTER col has no tab completion at all, right ? Right. > Good point. I started with this. > > diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml > index 39927be41e..8cceea41d0 100644 > --- a/doc/src/sgml/ref/alter_table.sgml > +++ b/doc/src/sgml/ref/alter_table.sgml > @@ -391,7 +391,21 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM > </term> > <listitem> > <para> > - This sets the compression method for a column. The supported compression > + This sets the compression method to be used for data inserted into a column. > + > + 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 > + with <application>pg_restore</application>, then all tuples are rewritten > + with the configured compression methods. > + > + Also, note that when data is inserted from another relation (for example, > + by <command>INSERT ... SELECT</command>), tuples from the source data are > + not necessarily detoasted, and any previously compressed data is retained > + with its existing compression method, rather than recompressing with the > + compression methods of the target columns. > + > + The supported compression > methods are <literal>pglz</literal> and <literal>lz4</literal>. > <literal>lz4</literal> is available only if <literal>--with-lz4</literal> > was used when building <productname>PostgreSQL</productname>. Your documentation looks fine to me. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
Commits
-
Add support for LZ4 build in MSVC scripts
- 9ca40dcd4d0c 14.0 landed
-
Add more TAP tests for pg_dump with attribute compression
- 63db0ac3f9e6 14.0 landed
-
doc: Fix some gaps with the documentation related to LZ4
- 02a93e7ef961 14.0 landed
-
Fix incorrect error code for CREATE/ALTER TABLE COMPRESSION
- 9681f2160dcb 14.0 landed
-
Additional doc fixes for configurable TOAST compression.
- 448b02c00515 14.0 landed
-
docs: Clarify how ALTER TABLE .. SET COMPRESSION works.
- 2d0f66240263 14.0 landed