Skip to content

[BUG] Dissemination timing issue with backups #5556

@phildominguez-gsa

Description

@phildominguez-gsa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Sprint #05 (4/23-5/7)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions