Re: pg_upgrade fails when FK constraint with same name exists on partitioned table and its partition
От
Álvaro Herrera
Тема
Re: pg_upgrade fails when FK constraint with same name exists on partitioned table and its partition
Дата
Msg-id
aihVOD_Q23zuHBE1@alvherre.pgsql
Ответ на
pg_upgrade fails when FK constraint with same name exists on partitioned table and its partition (Arseny Kositsin)
Список
Дерево обсуждения
pg_upgrade fails when FK constraint with same name exists on partitioned table and its partition Arseny Kositsin <a.kositsyn@postgrespro.ru>
Re: pg_upgrade fails when FK constraint with same name exists on partitioned table and its partition Álvaro Herrera <alvherre@kurilemu.de>
On 2026-Jun-08, Arseny Kositsin wrote: > ALTER TABLE ONLY xxi.trn_part1 > ADD CONSTRAINT fk_trn_acc FOREIGN KEY (acc_id) REFERENCES xxi.acc(id) NOT > VALID; > > ALTER TABLE xxi.trn > ADD CONSTRAINT fk_trn_acc FOREIGN KEY (acc_id) REFERENCES xxi.acc(id); So why not just drop the constraint in the partition? Seems rather useless. If there's a valid reason to have a constraint that's different from the one in the parent table, then you can rename it. I guess we could add a check to "pg_upgrade --check" to report this kind of thing ... I'm not really convinced of this though. Anyhow, I don't feel inclined to try to have pg_upgrade/pg_dump handle this case cleanly. -- Álvaro Herrera
В списке pgsql-hackers по дате отправления