[ZBX-24621] Upgrading postgres database from 6.4 to 7.0 cruch on patch 06050111 Created: 2024 Jun 07  Updated: 2024 Jun 11  Resolved: 2024 Jun 11

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Maciej Użdalewicz Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian 12 bookworm
Nginx 1.22
postgresql 16.3
php-fpm 8.3


Attachments: PNG File image-2024-06-07-11-25-35-135.png    

 Description   

Steps to reproduce:

Folow by update instructions on 2 Debian/Ubuntu (zabbix.com)

  1. stop zabbix_server service
  2. backup zabbix database on postgres
  3. Install php8.3-fpm
  4. stop php7.4-fpm service
  5. backup files and folders from instruction
  6. download and update apt repozitory for zabbix verzion 7.0
  7. upgrade zabbix-server-pgsql zabbix-frontend-php zabbix-agent
    1. durring upgrade save the repozitory zabbix_server.conf file
    2. ater upgrade changed DBPassword parameterr - only parameter set for instaletion of zabbix 6.4
  8. install php-pgsql
  9. start zabbix-server.service 

Result:

On zabbix page thers an error

on log file zabbix_server.log:

20040:20240607:092637.341 Starting Zabbix Server. Zabbix 7.0.0 (revision 49955f1fb5c).
 20040:20240607:092637.342 ****** Enabled features ******
 20040:20240607:092637.342 SNMP monitoring:           YES
 20040:20240607:092637.342 IPMI monitoring:           YES
 20040:20240607:092637.342 Web monitoring:            YES
 20040:20240607:092637.342 VMware monitoring:         YES
 20040:20240607:092637.342 SMTP authentication:       YES
 20040:20240607:092637.342 ODBC:                      YES
 20040:20240607:092637.342 SSH support:               YES
 20040:20240607:092637.342 IPv6 support:              YES
 20040:20240607:092637.342 TLS support:               YES
 20040:20240607:092637.342 ******************************
 20040:20240607:092637.342 using configuration file: /etc/zabbix/zabbix_server.conf
 20040:20240607:092637.453 current database version (mandatory/optional): 06050110/06050110
 20040:20240607:092637.453 required mandatory version: 07000000
 20040:20240607:092637.453 mandatory patches were found
 20040:20240607:092637.457 starting automatic database upgrade
 20040:20240607:092637.463 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  table tid from new index tuple (336,20) overlaps with invalid duplicate tuple at offset 27 of block 108 in index "items_8"
 [update items set timeout='' where type not in (19,21)]
 20040:20240607:092637.463 database upgrade failed on patch 06050111, exiting in 10 seconds
 20040:20240607:092647.464 Zabbix Server stopped. Zabbix 7.0.0 (revision 49955f1fb5c).

Expected:
Hotfix or Patched version of database migration script to pass 06050111 database patch



 Comments   
Comment by Alexander Vladishev [ 2024 Jun 09 ]

It looks very much like a corrupted database. Try making a dump of the database, restoring it, and only then performing the upgrade. This should help.

Comment by Edgar Akhmetshin [ 2024 Jun 11 ]

Not a Zabbix issue.

https://www.postgresql.org/docs/current/sql-reindex.html

REINDEX (VERBOSE) TABLE CONCURRENTLY items;

Closing as Won't fix.

Generated at Sun Jun 08 06:28:08 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.