Update or delete on table "graphs" violates foreign key constraint "c_graph_discovery_2" on table "graph_discovery"

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Steps to reproduce:

      1. Add any host with any template
      2. Try to delete it

      Result:

      Unable to delete any host as it just gives the same error message (with different graph IDs).
      Expected:

      To delete the host.

      Additional info:

      We have been using Zabbix since version 5, since then we had a migration over to Postgres (from MySQL) with Zabbix 6. We mostly use the Linux and the provided Mikrotik templates but others also seem to trigger the issue.

       

      If I go into the database and delete the IDs from graph_discovery then the web interface deletes the host successfully. For now I changed the schema to include the "CASCADE ON DELETE" part on that relationship (as it is not there by default).

            Assignee:
            Michal Laga
            Reporter:
            Gáncs Krisztián
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: