While working on #5547, we found an instance where the dump generated by a backup was unable to be loaded due to a foreign key error. The backup was for 04-13-12. The error was:
ERROR: insert or update on table "dissemination_note" violates foreign key constraint "dissemination_note_report_id_92fb7c83_fk_dissemina"
DETAIL: Key (report_id)=(2025-06-GSAFAC-0000411219) is not present in table "dissemination_general".
RESTORE FAILED: dissemination_note
I confirmed that in prod the audit was disseminated, but locally (from the dump) it was only certified. Backups take a bit to complete, so it's possible that dissemination_general was copied first and dissemination_notes later on, leaving a small window for it to be submitted/disseminated between the two.
Potential solution:
Can we just backup dissemination_general last to fix this?
Backups are taken by the backup utility via this script. That's where we start to determine which tables are backed up and in what order.
While working on #5547, we found an instance where the dump generated by a backup was unable to be loaded due to a foreign key error. The backup was for
04-13-12. The error was:I confirmed that in prod the audit was disseminated, but locally (from the dump) it was only certified. Backups take a bit to complete, so it's possible that
dissemination_generalwas copied first anddissemination_noteslater on, leaving a small window for it to be submitted/disseminated between the two.Potential solution:
Can we just backup
dissemination_generallast to fix this?Backups are taken by the backup utility via this script. That's where we start to determine which tables are backed up and in what order.