postgresql/src/include/nodes
Alexander Korotkov f2e4cc4279 Implement ALTER TABLE ... MERGE PARTITIONS ... command
This new DDL command merges several partitions into a single partition of the
target table.  The target partition is created using the new
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 this new DDL
command can't be recommended for large partitioned tables under a 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:17 +02:00
..
.gitignore Automatically generate node support functions 2022-07-09 08:53:59 +02:00
bitmapset.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
execnodes.h Add parallelism support for TID Range Scans 2025-11-27 14:05:04 +13:00
extensible.h Make it possible for loadable modules to add EXPLAIN options. 2025-03-18 08:41:12 -04:00
lockoptions.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
makefuncs.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
memnodes.h Englishify comment wording 2025-10-18 12:50:14 +13:00
meson.build meson: Increase minimum version to 0.57.2 2025-07-02 11:14:53 +02:00
miscnodes.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
multibitmapset.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
nodeFuncs.h Update various forward declarations to use typedef 2025-09-15 11:04:10 +02:00
nodes.h Pathify RHS unique-ification for semijoin planning 2025-08-19 09:35:40 +09:00
params.h Update various forward declarations to use typedef 2025-09-15 11:04:10 +02:00
parsenodes.h Implement ALTER TABLE ... MERGE PARTITIONS ... command 2025-12-14 13:29:17 +02:00
pathnodes.h Fix incorrect IndexOptInfo header comment 2025-11-24 17:00:01 +13:00
pg_list.h Swap order of extern/static and pg_nodiscard 2025-03-14 07:18:07 +01:00
plannodes.h Change "long" numGroups fields to be Cardinality (i.e., double). 2025-11-02 16:57:43 -05:00
primnodes.h Assign each subquery a unique name prior to planning it. 2025-10-07 09:18:54 -04:00
print.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
queryjumble.h Make query jumbling also squash PARAM_EXTERN params 2025-06-24 19:36:32 +02:00
readfuncs.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
replnodes.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
subscripting.h Fix stray references to SubscriptRef 2025-12-03 14:44:14 +01:00
supportnodes.h Have the planner replace COUNT(ANY) with COUNT(*), when possible 2025-11-27 10:43:28 +13:00
tidbitmap.h Fix some confusing uses of const 2025-10-30 11:20:04 +01:00
value.h Update copyright for 2025 2025-01-01 11:21:55 -05:00