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
