Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-25316

Zabbix 6.0 violates Primary Key on 'history' table

XMLWordPrintable

    • Icon: Documentation task Documentation task
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • None
    • Server (S)
    • None

      Steps to reproduce:

      1. Zabbix server upgraded from 5.0.22 to 6.0.14
      2. PostgreSQL used 15.7.

      Result:
      Violating Primary Key Constraint on table history (see screenshot).
      Expected:
      For PK on history* tables were introduced at Zabbix server 6.0.14, we've not expected such errors to occure.

       

      A bit details:

      Patroni Cluster of PG 15.7 (3 nodes) runs as logical replication of Prod Patroni Cluster of PG (12.7). Prod Patroni Cluster works as Database for Zabbix Server 5.0.22.

      For testing purposes we switched the 3rd node 15.7 from Patroni and tested it as Database for Zabbix Server 6.0.14 (Primary Keys added to history* tables on 'itemid' + 'clock' + 'ns' columns). This is the Database that faced violating PK (its log on screenshot).

      The values violating PK don't exist in Prod Cluster, so I assume they are inserted by Zabbix Server 6.0.14, and 2024-09-25 the database received a request on duplicating insert.

      Thanks in advance!

            zabbix.dev Zabbix Development Team
            jurassoff Nikita Yurasov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: