Error: Update or Delete on Table Violates Foreign Key Constraint
Issue
A connector running on a Amazon RDS for PostgreSQL destination fails with the following error:
ERROR: update or delete on table "x" violates foreign key constraint "y" on table "x"
.
Environment
Amazon RDS for PostgreSQL destination
Resolution
Drop the foreign key constraint on the table in the PostgreSQL destination.
Cause
Fivetran doesn't create a foreign key constraint on a table because PostgreSQL doesn't allow the deletion of records from a table that contains a foreign key.