PostgreSQL Error when running latest version update of GVM 21.04

Hello everyone. I am experiencing issues with installing the latest version of 21.04 GVM today. Before I had no issues running my script but now I am experiencing this new error after I install postgres and continue setting my gmvd:

(gvmd:30504): md manage-WARNING **: 15:35:15.381: sql_exec_internal: PQexec failed: ERROR: relation "nvt_preferences" does not exist

Which continues towards these issues:

> (gvmd:30504): md manage-WARNING **: 15:35:15.382: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION vts_verification_str () RETURNS text AS $$ WITH pref_str AS ( SELECT name, substring(name, '^(.*?):') AS oid, substring (name, '^.*?:([^:]+):') AS pref_id, (substring (name, '^.*?:([^:]+):') || substring (name, '^[^:]*:[^:]*:[^:]*:(.*)') || value) AS pref FROM nvt_preferences ), nvt_str AS ( SELECT (SELECT nvts.oid || max(modification_time) || coalesce (string_agg(pref_str.pref, '' ORDER BY (pref_id COLLATE "C.UTF-8")), '')) AS vt_string FROM nvts LEFT JOIN pref_str ON nvts.oid = pref_str.oid GROUP BY nvts.oid ORDER BY (nvts.oid COLLATE "C.UTF-8") ASC ) SELECT coalesce (string_agg (nvt_str.vt_string, ''), '') FROM nvt_str$$ LANGUAGE SQL STABLE;

I would appreciate any help.

I think it should be related to https://github.com/greenbone/gvmd/issues/1608

1 Like

With the second comment it is the same. I’ll check on my side on what I can do. The installation process worked before but of course this pops up. I am thinking how I download the branches would be an issue. I do it like so:

  git clone -b "gvmd-$GVM_VERSION" https://github.com/greenbone/gvmd.git \
    || (cd gvmd; git pull --all; git checkout "gvmd-$GVM_VERSION"; git pull; cd ..)

Hi, I am currently facing the same issue. We are working on it.

I’ve created a PR that should fix this once it is backported to the 21.04 and 20.08 branches:

Thank you @bricks and @tpollmeier. I will await the push for this fix. :slight_smile:

The PRs have been merged to the corresponding branches.