Gvmd: sql_exec_internal: PQexec failed: ERROR: column "hash_value" does not exist

Hi there,

I built gvmd from scratch using the latest stable git source, the following error occurred when I scanning a target:

md manage:WARNING:2023-05-22 09h05.01 UTC:986: sql_exec_internal: PQexec failed: ERROR:  column "hash_value" does not exist
LINE 1: ...ISTS (SELECT * FROM results  WHERE report = 1 and hash_value...
                                                             ^
 (7)
md manage:WARNING:2023-05-22 09h05.01 UTC:986: sql_exec_internal: SQL: SELECT EXISTS (SELECT * FROM results  WHERE report = 1 and 
hash_value = '...');
md manage:WARNING:2023-05-22 09h05.01 UTC:986: sql_x: sql_exec_internal failed
md manage:WARNING:2023-05-22 09h05.01 UTC:986: manage_cleanup_process_error: Error exit, setting running task to Interrupted
md manage:WARNING:2023-05-22 09h05.01 UTC:986: sql_exec_internal: PQexec failed: ERROR:  current transaction is aborted, commands 
ignored until end of transaction block
 (7)
md manage:WARNING:2023-05-22 09h05.01 UTC:986: sql_exec_internal: SQL: UPDATE reports SET scan_run_status = 13 WHERE id = 1;
md manage:WARNING:2023-05-22 09h05.01 UTC:986: sqlv: sql_exec_internal failed

I think the reason is that the column hash_value is not created when the results and report_host_details tables are created, but only be added when the DB is migrated from the version less than 253 (the latest DB version is 253).

Hello,

i would suggest to open an issue at https://github.com/greenbone/gvmd/issues to start a conversation with the development team responsible for this component.

1 Like

Links to the relevant GitHub issue and pull request for tracking purposes, thanks a lot for your contribution.

https://github.com/greenbone/gvmd/issues/1990

https://github.com/greenbone/gvmd/pull/1991

2 Likes