You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to see an upgrade process that separates the loading of the schema and the data because currently, the upgrade process reorders the triggers.
Background:
After a pg_dump and pg_restore, all foreign key constraints are placed in alphabetical order by their name. Then converted into triggers RI_ConstraintTrigger_ . Any new constraints added after the pg_restore will simply increment the field in the Trigger. Our database is dependent on some of these triggers happening before others. This article explains how constraints/triggers are run. After an upgrade, our constraints were not placed in the same order as created. Causing some errors which have now been addressed by this PR.
Visual:
Pre Upgrade: Constraint Triggers are created in the order the constraints were made
Is your feature request related to a problem? Please describe.
I would like to see an upgrade process that separates the loading of the schema and the data because currently, the upgrade process reorders the triggers.
Background:
After a
pg_dump
andpg_restore
, all foreign key constraints are placed in alphabetical order by their name. Then converted into triggers RI_ConstraintTrigger_ . Any new constraints added after thepg_restore
will simply increment the field in the Trigger. Our database is dependent on some of these triggers happening before others. This article explains how constraints/triggers are run. After an upgrade, our constraints were not placed in the same order as created. Causing some errors which have now been addressed by this PR.Visual:
Pre Upgrade: Constraint Triggers are created in the order the constraints were made
Post pg_dump: Constraints are put in alphabetical and then turned into Triggers
Describe the solution you would like
Here is a list of options that I have considered.
The text was updated successfully, but these errors were encountered: