Skip to content

Pgadmin restore fails with foreign key constraint errors #9432

@dgxhubbard

Description

@dgxhubbard

When I restore a backup into an empty database I get errors of this type:

pg_restore: from TOC entry 6445; 2606 45956 FK CONSTRAINT CTP FK_CalibrationTestPoint_GageTypes_RefStandType_RID_FK postgres
pg_restore: error: could not execute query: ERROR: insert or update on table "CTP" violates foreign key constraint "FK_CTP_Types_StandType_RID_FK"
DETAIL: Key (StandType_RID_FK)=(4) is not present in table "Types".
Command was: ALTER TABLE ONLY "GT"."CTP"

I have set restore to use 1 job, with Sections pre-data, post-data and data turned on. And with triggers disabled.
So the restore should recreate the schema, and insert data without FK constraints. How do I get this to just work?
Is there some simple way to do this without the use of all these options.

I am logged in as the postgres user in pgadmin so I should be the super user.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions