From 337fe9ee0288df424ac15cef3e68fba096525af7 Mon Sep 17 00:00:00 2001 From: Alexander Korotkov Date: Sun, 28 Apr 2024 03:39:30 +0300 Subject: [PATCH v9 2/7] Document the way parition MERGE/SPLIT operations create new partitions Reported-by: Justin Pryzby Discussion: https://postgr.es/m/ZilrByTp-pbz6Mvf%40pryzbyj2023 --- doc/src/sgml/ref/alter_table.sgml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index fe36ff82e52..8a10a8bd79b 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -1153,6 +1153,12 @@ WITH ( MODULUS numeric_literal, REM splitting we have a partition with the same name). Only simple, non-partitioned partition can be split. + + New partitions are created the same way as they get created with an + SQL command CREATE TABLE partition_name1 (LIKE name INCLUDING ALL EXCLUDING INDEXES EXCLUDING IDENTITY). + The indexes and identity are created later after moving the data + while attaching new partitions. + This command acquires an ACCESS EXCLUSIVE lock. @@ -1213,6 +1219,12 @@ WITH ( MODULUS numeric_literal, REM can have the same name as one of the merged partitions. Only simple, non-partitioned partitions can be merged. + + The new partition are created the same way as it gets created with an + SQL command CREATE TABLE partition_name (LIKE name INCLUDING ALL EXCLUDING INDEXES EXCLUDING IDENTITY). + The indexes and identity are created later after moving the data + while attaching the new partition. + This command acquires an ACCESS EXCLUSIVE lock. -- 2.39.3 (Apple Git-145)