pg_query(): Query failed: ERROR: column "name_upper" of relation "hosts" does not exist
LINE 1: update hosts set name_upper=upper(name) ^ QUERY: update hosts set name_upper=upper(name) where hostid=new.hostid CONTEXT: PL/pgSQL function hosts_name_upper_upper() line 3 at SQL statement [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerPopupImport->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processTemplates() → CTemplateImporter->import() → CTemplate->create() → DB::insert() → DB::insertBatch() → DBexecute() → pg_query() in include/db.inc.php:373][*]
Error in query [INSERT INTO hosts (hostid,uuid,host,name,description,status) VALUES ('10595','fa664cb5405943759507ae2835e56ff7','RR - OLT V-SOLUTIONS','RR - OLT V-SOLUTIONS','','3')] [ERROR: column "name_upper" of relation "hosts" does not exist LINE 1: update hosts set name_upper=upper(name) ^ QUERY: update hosts set name_upper=upper(name) where hostid=new.hostid CONTEXT: PL/pgSQL function hosts_name_upper_upper() line 3 at SQL statement][*]SQL statement execution has failed "INSERT INTO hosts (hostid,uuid,host,name,description,status) VALUES ('10595','fa664cb5405943759507ae2835e56ff7','RR - OLT V-SOLUTIONS','RR - OLT V-SOLUTIONS','','3')".
LINE 1: update hosts set name_upper=upper(name) ^ QUERY: update hosts set name_upper=upper(name) where hostid=new.hostid CONTEXT: PL/pgSQL function hosts_name_upper_upper() line 3 at SQL statement [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerPopupImport->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processTemplates() → CTemplateImporter->import() → CTemplate->create() → DB::insert() → DB::insertBatch() → DBexecute() → pg_query() in include/db.inc.php:373][*]
Error in query [INSERT INTO hosts (hostid,uuid,host,name,description,status) VALUES ('10595','fa664cb5405943759507ae2835e56ff7','RR - OLT V-SOLUTIONS','RR - OLT V-SOLUTIONS','','3')] [ERROR: column "name_upper" of relation "hosts" does not exist LINE 1: update hosts set name_upper=upper(name) ^ QUERY: update hosts set name_upper=upper(name) where hostid=new.hostid CONTEXT: PL/pgSQL function hosts_name_upper_upper() line 3 at SQL statement][*]SQL statement execution has failed "INSERT INTO hosts (hostid,uuid,host,name,description,status) VALUES ('10595','fa664cb5405943759507ae2835e56ff7','RR - OLT V-SOLUTIONS','RR - OLT V-SOLUTIONS','','3')".
And in tail -f /var/log/zabbix/zabbix_server.log I can see:
25523:20230117:035101.587 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: column "name_upper" of relation "items" does not exist
LINE 1: update items set name_upper=upper(name)
^
QUERY: update items set name_upper=upper(name)
where itemid=new.itemid
LINE 1: update items set name_upper=upper(name)
^
QUERY: update items set name_upper=upper(name)
where itemid=new.itemid
And also should appear, if your upgrade procedures went correctly. Do you have logs at hand to look for the first startup of your 6.2.7 server? it should contain all the info about upgrade process... If there is an error somewhere, you need to resolve it... 
Or there is some logic error in patch. Seems it decides based on trigger existence, if it needs to create columns and add triggers... but how your db already has those triggers... I cannot say...
Comment