diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-05-23 02:21:00 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-05-23 02:21:00 +0300 |
commit | 3a82c689fd1be9bdf9d60135e5db7d352c051269 (patch) | |
tree | 02ae38c5f7f13a7bf143b35813eeadda0f6161d3 /doc/src | |
parent | 97e5b0026fc276ab1bcde58ae98ae1fcd9c3acc3 (diff) | |
download | postgresql-3a82c689fd1be9bdf9d60135e5db7d352c051269.tar.gz postgresql-3a82c689fd1be9bdf9d60135e5db7d352c051269.zip |
Fix the name collision detection in MERGE/SPLIT partition operations
Both MERGE and SPLIT partition operations support the case when the name of the
new partition matches the name of the existing partition to be merged/split.
But the name collision detection doesn't always work as intended. The SPLIT
partition operation finds the namespace to search for an existing partition
without taking into account the parent's persistence. The MERGE partition
operation checks for the name collision with simple equal() on RangeVar's
simply ignoring the search_path.
This commit fixes this behavior as follows.
1. The SPLIT partition operation now finds the namespace to search for
an existing partition according to the parent's persistence.
2. The MERGE partition operation now checks for the name collision similarly
to the SPLIT partition operation using
RangeVarGetAndCheckCreationNamespace() and get_relname_relid().
Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/86b4f1e3-0b5d-315c-9225-19860d64d685%40gmail.com
Author: Dmitry Koval, Alexander Korotkov
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions