v9-0002-Document-the-way-parition-MERGE-SPLIT-operations-.patch

application/octet-stream

Filename: v9-0002-Document-the-way-parition-MERGE-SPLIT-operations-.patch
Type: application/octet-stream
Part: 3
Message: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v9-0002
Subject: Document the way parition MERGE/SPLIT operations create new partitions
File+
doc/src/sgml/ref/alter_table.sgml 12 0
From 337fe9ee0288df424ac15cef3e68fba096525af7 Mon Sep 17 00:00:00 2001
From: Alexander Korotkov <akorotkov@postgresql.org>
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 <replaceable class="parameter">numeric_literal</replaceable>, REM
       splitting we have a partition with the same name).
       Only simple, non-partitioned partition can be split.
      </para>
+     <para>
+      New partitions are created the same way as they get created with an
+      SQL command <literal>CREATE TABLE <replaceable class="parameter">partition_name1</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
+      while attaching new partitions.
+     </para>
      <note>
       <para>
        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,
       non-partitioned partitions can be merged.
      </para>
+     <para>
+      The new partition are created the same way as it gets created with an
+      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
+      while attaching the new partition.
+     </para>
      <note>
       <para>
        This command acquires an <literal>ACCESS EXCLUSIVE</literal> lock.
-- 
2.39.3 (Apple Git-145)