Hi!
1.
29.04.2024 21:00, Alexander Lakhin wrote:
> I still wonder, why that constraint (now with a less questionable name) is
> created during MERGE?
The SPLIT/MERGE PARTITION(S) commands for creating partitions reuse the
existing code of CREATE TABLE .. LIKE ... command. A new partition was
created with the name "merge-16385-26BCB0-tmp" (since there was an old
partition with the same name). The constraint
"merge-16385-26BCB0-tmp_i_not_null" was created too together with the
partition. Subsequently, the table was renamed, but the constraint was not.
Now a new partition is immediately created with the correct name (the
old partition is renamed).
2.
Just in case, I am attaching a small fix v9_fix.diff for situation [1].
[1]
https://www.postgresql.org/message-id/0520c72e-8d97-245e-53f9-173beca2ab2e%40gmail.com
--
With best regards,
Dmitry Koval
Postgres Professional: http://postgrespro.com