postgresql/src/include/parser
Alexander Korotkov 4b3d173629 Implement ALTER TABLE ... SPLIT PARTITION ... command
This new DDL command splits a single partition into several partitions.  Just
like the ALTER TABLE ... MERGE PARTITIONS ... command, new partitions are
created using the createPartitionTable() function with the parent partition
as the template.

This commit comprises a quite naive implementation which works in a single
process and holds the ACCESS EXCLUSIVE LOCK on the parent table during all
the operations, including the tuple routing.  This is why the new DDL command
can't be recommended for large, partitioned tables under high load.  However,
this implementation comes in handy in certain cases, even as it is.  Also, it
could serve as a foundation for future implementations with less locking and
possibly parallelism.

Discussion: https://postgr.es/m/c73a1746-0cd0-6bdd-6b23-3ae0b7c0c582%40postgrespro.ru
Author: Dmitry Koval <d.koval@postgrespro.ru>
Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com>
Co-authored-by: Tender Wang <tndrwang@gmail.com>
Co-authored-by: Richard Guo <guofenglinux@gmail.com>
Co-authored-by: Dagfinn Ilmari Mannsaker <ilmari@ilmari.org>
Co-authored-by: Fujii Masao <masao.fujii@gmail.com>
Co-authored-by: Jian He <jian.universality@gmail.com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-by: Zhihong Yu <zyu@yugabyte.com>
Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Robert Haas <rhaas@postgresql.org>
Reviewed-by: Stephane Tachoires <stephane.tachoires@gmail.com>
Reviewed-by: Jian He <jian.universality@gmail.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Alexander Lakhin <exclusion@gmail.com>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Daniel Gustafsson <dgustafsson@postgresql.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Noah Misch <noah@leadboat.com>
2025-12-14 13:29:38 +02:00
..
analyze.h Change SQL-language functions to use the plan cache. 2025-04-02 14:06:02 -04:00
kwlist.h Implement ALTER TABLE ... SPLIT PARTITION ... command 2025-12-14 13:29:38 +02:00
parse_agg.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_clause.h Add GROUP BY ALL. 2025-09-29 16:55:17 -04:00
parse_coerce.h Handle default NULL insertion a little better. 2025-01-29 15:31:55 -05:00
parse_collate.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_cte.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_enr.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_expr.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_func.h Provide more-specific error details/hints for function lookup failures. 2025-09-16 12:17:02 -04:00
parse_merge.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_node.h Revert support for improved tracking of nested queries 2025-06-12 10:08:55 +09:00
parse_oper.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_param.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_relation.h Improve detection of implicitly-temporary views. 2025-11-24 17:00:16 -05:00
parse_target.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_type.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_utilcmd.h Update various forward declarations to use typedef 2025-09-15 11:04:10 +02:00
parser.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parsetree.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
scanner.h pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
scansup.h Update copyright for 2025 2025-01-01 11:21:55 -05:00