Migrating to PostgreSQL from sqlite fails

Hi!

I’ve followed the instructions on https://fossies.org/linux/misc/openvas/openvas-manager-7.0.3.tar.gz/gvm-7.0.3/doc/postgres-HOWTO creating the database:

# su - postgres
$ createuser -DRS root
$ createdb -O root tasks
$ psql
postgres=# \c tasks
tasks=# create role dba with superuser noinherit;
tasks=# grant dba to "root";
tasks=# create extension "uuid-ossp";
tasks=# \q
$ exit
# openvas-migrate-to-postgres
# openvasmd --rebuild
# greenbone-scapdata-sync
# greenbone-certdata-sync
# systemctl start openvasmd
#

openvas-migrate-to-postgres ran without any errors.
openvasmd --migrate did not output anything.
greenbone-scapdata-sync ran downloading files.
greenbone-certdata-sync ran downloading files, then exausted an error about shema.
systemctl start openvasmd was successful, but openvasmd terminated immediately. Trying with /usr/local/sbin/openvasmd --foreground --verbose just gave no output at all. openvasmd is started, but terminates instantly.

If I do:

# su - postgres
$ psql
postgres=# drop database tasks;
postgres=# create database tasks;
postgres=# \q
$ exit
# systemctl start openvasmd
#

openvasmd starts. Any idea, why an empty database works, but a migrated one not?

GVM Versions

Oops, secure memory pool already initialized
gsad:

9971f3f0e 2019-03-28 | Merge pull request #1230 from timopollmeier/bulk-host-delete-fix-7.0 (HEAD -> gsa-7.0, origin/gsa-7.0)

Greenbone Security Assistant 7.0.4
GIT revision 9971f3f0e-gsa-7.0
Copyright (C) 2010-2016 Greenbone Networks GmbH
License GPLv2+: GNU GPL version 2 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

openvasmd:

c84c7008 2019-05-24 | Merge pull request #559 from timopollmeier/remove-slave-type-7.0 (HEAD -> openvas-manager-7.0, origin/openvas-manager-7.0)

OpenVAS Manager 7.0.4
GIT revision c84c7008-openvas-manager-7.0
Manager DB revision 184
Copyright (C) 2010-2016 Greenbone Networks GmbH
License GPLv2+: GNU GPL version 2 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

openvas:

5ab4352 2019-01-07 | Merge pull request #236 from jjnicola/fix-typo (HEAD -> openvas-scanner-5.1, origin/openvas-scanner-5.1)

OpenVAS Scanner 5.1.3
Most new code since 2005: (C) 2016 Greenbone Networks GmbH
Nessus origin: (C) 2004 Renaud Deraison <deraison@nessus.org>
License GPLv2: GNU GPL version 2
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gvm-libs:

e9eb0d91 2019-04-24 | Use g_log instead of g_debug for No redis DB available message. (HEAD -> openvas-libraries-9.0, origin/openvas-libraries-9.0)

gvm-tools:

8404d43 2019-06-13 | Merge pull request #197 from bjoernricks/readme-improvements (HEAD -> master, origin/master, origin/HEAD)

node:

v11.15.0

redis-server:

Redis server v=5.0.3 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=355ed63f25401f51

Environment

Operating system:

Linux gvm-latest 4.19.0-5-amd64 #1 SMP Debian 4.19.37-3 (2019-05-15) x86_64 GNU/Linux
Debian testing (10.0)

Installation method / source:

source installation, git checkout of latest stable branches