postgresql/src/backend
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
..
access Avoid repeating loads of frozen ID values. 2024-04-29 10:25:33 -07:00
archive Add built-in ERROR handling for archive callbacks. 2024-04-02 22:28:11 -05:00
backup Fix unnecessary padding in incremental backups 2024-04-14 20:37:49 +02:00
bootstrap Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
catalog Fix failure to track role dependencies of pg_init_privs entries. 2024-04-29 19:26:19 -04:00
commands Change the way ATExecMergePartitions() handles the name collision 2024-04-30 11:54:42 +03:00
executor Remove some unnecessary fields from executor nodes. 2024-04-23 12:55:26 -04:00
foreign Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
jit Remove dead code 2024-04-17 10:48:04 +02:00
lib Revert: Implement pg_wal_replay_wait() stored procedure 2024-04-11 17:28:15 +03:00
libpq Reject SSL connection if ALPN is used but there's no common protocol 2024-04-29 18:12:26 +03:00
main Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
nodes revert: Transform OR clauses to ANY expression 2024-04-10 02:28:09 +03:00
optimizer Use macro NUM_MERGE_MATCH_KINDS instead of '3' in MERGE code. 2024-04-19 09:40:20 +01:00
parser Use macro NUM_MERGE_MATCH_KINDS instead of '3' in MERGE code. 2024-04-19 09:40:20 +01:00
partitioning Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
po Update copyright for 2024 2024-01-03 20:49:05 -05:00
port Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
postmaster Avoid repeating loads of frozen ID values. 2024-04-29 10:25:33 -07:00
regex Support C.UTF-8 locale in the new builtin collation provider. 2024-03-19 15:24:41 -07:00
replication Fix duplicated consecutive words in comments 2024-04-28 20:03:34 +12:00
rewrite Add RETURNING support to MERGE. 2024-03-17 13:58:59 +00:00
snowball Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
statistics Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
storage Fix duplicated consecutive words in comments 2024-04-28 20:03:34 +12:00
tcop Post-commit review fixes for slot synchronization. 2024-04-25 14:01:44 +05:30
tsearch Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
utils Revert "Add GUC backtrace_on_internal_error" 2024-04-29 10:49:42 +02:00
.gitignore
Makefile Rework lwlocknames.txt to become lwlocklist.h 2024-03-20 11:55:20 +01:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
meson.build Remove AIX support 2024-02-28 15:17:23 +04:00
nls.mk Remove distprep 2023-11-06 15:18:04 +01:00