postgresql/src
Alexander Korotkov 885742b9f8 Change the way ATExecMergePartitions() handles the name collision
The name collision happens when the name of the new partition is the same as
the name of one of the merging partitions.  Currently, ATExecMergePartitions()
first gives the new partition a temporary name and then renames it when old
partitions are deleted.  That negatively influences the naming of related
objects like indexes and constrains, which could inherit a temporary name.

This commit changes the implementation in the following way.  A merging
partition gets renamed first, then the new partition is created with the
right name immediately.  This resolves the issue of the naming of related
objects.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/edfbd846-dcc1-42d1-ac26-715691b687d3%40postgrespro.ru
Author: Dmitry Koval, Alexander Korotkov
Reviewed-by: Robert Haas, Justin Pryzby, Pavel Borisov
2024-04-30 11:54:42 +03:00
..
backend Change the way ATExecMergePartitions() handles the name collision 2024-04-30 11:54:42 +03:00
bin libpq: If ALPN is not used, make PQsslAttribute(conn, "alpn") == "" 2024-04-29 12:26:46 +03:00
common Remove redundant JSON parser typedefs 2024-04-27 07:02:57 -04:00
fe_utils Allow dbname to be written as part of connstring via pg_basebackup's -R option. 2024-03-21 10:50:33 +05:30
include Fix failure to track role dependencies of pg_init_privs entries. 2024-04-29 19:26:19 -04:00
interfaces Fix compilation on OpenSSL 1.0.2 and LibreSSL 2024-04-30 08:22:24 +03:00
makefiles Optimize pg_popcount() with AVX-512 instructions. 2024-04-06 21:56:23 -05:00
pl Fix plpgsql's handling of -- comments following expressions. 2024-04-10 15:45:58 -04:00
port Fix code for probing availability of AVX-512. 2024-04-23 10:54:04 -05:00
template Remove AIX support 2024-02-28 15:17:23 +04:00
test Change the way ATExecMergePartitions() handles the name collision 2024-04-30 11:54:42 +03:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Remove redundant JSON parser typedefs 2024-04-27 07:02:57 -04:00
tutorial Update copyright for 2024 2024-01-03 20:49:05 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Update Unicode data to CLDR 45 2024-04-22 09:16:33 +02:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00