aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-02-28 19:24:21 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-02-28 19:24:21 -0300
commit2c31825fb9a95914418f1e376917f60841a26c78 (patch)
tree47af614885ce1c5ca18b0377f311660a5ab69c58
parent4598a99cf22de0dbab975d9c87ce16fd53146aca (diff)
downloadpostgresql-2c31825fb9a95914418f1e376917f60841a26c78.tar.gz
postgresql-2c31825fb9a95914418f1e376917f60841a26c78.zip
Improve docs for ALTER TABLE .. SET TABLESPACE
Discussion: https://postgr.es/m/20190220173815.GA7959@alvherre.pgsql Reviewed-by: Robert Haas
-rw-r--r--doc/src/sgml/ref/alter_table.sgml9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 0aa0f093f23..890b23afd64 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -630,6 +630,13 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
moves the data file(s) associated with the table to the new tablespace.
Indexes on the table, if any, are not moved; but they can be moved
separately with additional <literal>SET TABLESPACE</literal> commands.
+ When applied to a partitioned table, nothing is moved, but any
+ partitions created afterwards with
+ <command>CREATE TABLE PARTITION OF</command> will use that tablespace,
+ unless the <literal>TABLESPACE</literal> clause is used to override it.
+ </para>
+
+ <para>
All tables in the current database in a tablespace can be moved by using
the <literal>ALL IN TABLESPACE</literal> form, which will lock all tables
to be moved first and then move each one. This form also supports
@@ -637,7 +644,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
roles specified. If the <literal>NOWAIT</literal> option is specified
then the command will fail if it is unable to acquire all of the locks
required immediately. Note that system catalogs are not moved by this
- command, use <command>ALTER DATABASE</command> or explicit
+ command; use <command>ALTER DATABASE</command> or explicit
<command>ALTER TABLE</command> invocations instead if desired. The
<literal>information_schema</literal> relations are not considered part
of the system catalogs and will be moved.