mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
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
This commit is contained in:
parent
885742b9f8
commit
842c9b2705
@ -1153,6 +1153,12 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
|
|||||||
splitting we have a partition with the same name).
|
splitting we have a partition with the same name).
|
||||||
Only simple, non-partitioned partition can be split.
|
Only simple, non-partitioned partition can be split.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
The new partitions will be created the same as tables created with the
|
||||||
|
SQL command <literal>CREATE TABLE <replaceable class="parameter">partition_nameN</replaceable> (LIKE <replaceable class="parameter">name</replaceable> INCLUDING ALL EXCLUDING INDEXES EXCLUDING IDENTITY)</literal>.
|
||||||
|
The indexes and identity are created later, after moving the data
|
||||||
|
into the new partitions.
|
||||||
|
</para>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
This command acquires an <literal>ACCESS EXCLUSIVE</literal> lock.
|
This command acquires an <literal>ACCESS EXCLUSIVE</literal> lock.
|
||||||
@ -1213,6 +1219,12 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
|
|||||||
can have the same name as one of the merged partitions. Only simple,
|
can have the same name as one of the merged partitions. Only simple,
|
||||||
non-partitioned partitions can be merged.
|
non-partitioned partitions can be merged.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
The new partition will be created the same as a table created with the
|
||||||
|
SQL command <literal>CREATE TABLE <replaceable class="parameter">partition_name</replaceable> (LIKE <replaceable class="parameter">name</replaceable> INCLUDING ALL EXCLUDING INDEXES EXCLUDING IDENTITY)</literal>.
|
||||||
|
The indexes and identity are created later, after moving the data
|
||||||
|
into the new partition.
|
||||||
|
</para>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
This command acquires an <literal>ACCESS EXCLUSIVE</literal> lock.
|
This command acquires an <literal>ACCESS EXCLUSIVE</literal> lock.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user