Skip to content

Commit 842c9b2

Browse files
committed
Document the way partition MERGE/SPLIT operations create new partitions
Reported-by: Justin Pryzby Discussion: https://postgr.es/m/ZilrByTp-pbz6Mvf%40pryzbyj2023 Reviewed-by: Justin Pryzby
1 parent 885742b commit 842c9b2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/src/sgml/ref/alter_table.sgml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,12 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
11531153
splitting we have a partition with the same name).
11541154
Only simple, non-partitioned partition can be split.
11551155
</para>
1156+
<para>
1157+
The new partitions will be created the same as tables created with the
1158+
SQL command <literal>CREATE TABLE <replaceable class="parameter">partition_nameN</replaceable> (LIKE <replaceable class="parameter">name</replaceable> INCLUDING ALL EXCLUDING INDEXES EXCLUDING IDENTITY)</literal>.
1159+
The indexes and identity are created later, after moving the data
1160+
into the new partitions.
1161+
</para>
11561162
<note>
11571163
<para>
11581164
This command acquires an <literal>ACCESS EXCLUSIVE</literal> lock.
@@ -1213,6 +1219,12 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
12131219
can have the same name as one of the merged partitions. Only simple,
12141220
non-partitioned partitions can be merged.
12151221
</para>
1222+
<para>
1223+
The new partition will be created the same as a table created with the
1224+
SQL command <literal>CREATE TABLE <replaceable class="parameter">partition_name</replaceable> (LIKE <replaceable class="parameter">name</replaceable> INCLUDING ALL EXCLUDING INDEXES EXCLUDING IDENTITY)</literal>.
1225+
The indexes and identity are created later, after moving the data
1226+
into the new partition.
1227+
</para>
12161228
<note>
12171229
<para>
12181230
This command acquires an <literal>ACCESS EXCLUSIVE</literal> lock.

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