-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gvmd restarts with error: relation “information_schema_catalog_name” does not exist #611
Comments
After a "sudo reboot", I'm getting the same/similar issue on one of our scanners. gvmd 8.0.2 will not start and throws the same error:
I have no working knowledge of Postgres, but it looks like the relation in question is in fact non existent:
|
Thanks for the well explained report. |
Does anyone have a workaround for this (that doesn't involve patching the code)? If one exists and could be shared, that would be much appreciated! |
Our workaround was to follow the "Handy script to drop all data" from https://github.com/greenbone/gvmd/blob/gvmd-8.0/doc/postgres-HOWTO, then do a sync of the scan server (greenbone-nvt-sync, greenbone-certdata-sync, greenbone-scapdata-sync), create users by hand, and finally import scan configs (and portlist configs) from backups. |
Should be fixed with #642 |
Thank you for the fix! |
On 1 of our 8 test scanners (all running the latest stable release of gvm 10), gvmd restarts continuously, throwing the following error into our postgres log file:
We tracked the source query down to
/src/manage_pg.c
line 3284, which contains this query:We dug into why this error occurred on this machine, and not on any others, and found that it came down to the way postgres plans the query. The call to
pg_get_serial_sequence
in theWHERE
clause throws an error if evaluated before thetable_schema = 'public'
condition. In most cases, these conditions are evaluated in the order they appear, andpg_get_serial_sequence
is only called on things in thepublic
schema. In some cases, however, postgres for some reason decides to evaluatepg_get_serial_sequence
first, and chokes on its inability to identify a schema for which it does not have a search path (ie notpublic
).We rewrote the query into one that always works by using a precomputed CTE to trick postgres' query planner into evaluating the conditions in the desired order:
Would someone please double-check our suggestion and consider incorporating this (or similar) into forthcoming releases? Thank you!
The text was updated successfully, but these errors were encountered: