[ZBX-25316] Zabbix 6.0 violates Primary Key on 'history' table Created: 2024 Sep 30  Updated: 2024 Nov 13  Resolved: 2024 Nov 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Nikita Yurasov Assignee: Zabbix Development Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2024-09-30-13-57-14-907.png     PNG File image-2024-11-11-13-09-08-477.png    
Issue Links:
Duplicate
duplicates ZBX-23853 Message "query failed due to primary ... Closed
duplicates ZBX-25148 Duplicate key value violates unique c... READY TO DEVELOP

 Description   

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!



 Comments   
Comment by Alexander Vladishev [ 2024 Sep 30 ]

This already fixed in version 6.0.29 in ZBX-23853.

Comment by Nikita Yurasov [ 2024 Nov 11 ]

Hello again!

We've upgraded to 6.0.29, this version has been working for about a month.

Nov 08 we faced the primary key violations again, corresponding log entries are on the screenshot (next comment).

Need help, please!

Comment by Nikita Yurasov [ 2024 Nov 11 ]

Comment by Alexander Vladishev [ 2024 Nov 13 ]

Closed as duplicate of ZBX-25148. Please follow updates there.

Generated at Wed Feb 26 19:15:39 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.