From: | Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> |
---|---|
To: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
Date: | 2024-04-30 00:10:47 |
Message-ID: | d95dc63f-e805-44bc-8429-9be423293620@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
Attachment | Content-Type | Size |
---|---|---|
v9_fix.diff | text/plain | 647 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2024-04-30 00:43:32 | Re: A failure in prepared_xacts test |
Previous Message | Tom Lane | 2024-04-29 23:50:16 | Re: DROP OWNED BY fails to clean out pg_init_privs grants |