Libpq-dev-13 and postgresql-11 with gvmd 20.08.1

Hello;

I’m building gvmd 20.08.1 against postgresql 11 (that’s the version I’m using). However, for some reason, while building gvmd, it says installed postgresql version is 13:

– Looking for PostgreSQL…
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):

  • Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found*
  • version “13.1 (Ubuntu 13.1-1.pgdg18.04+1)”)*

While installed postgresql packages are:

ii postgresql-11 11.9-1.pgdg18.04+1 amd64 object-relational SQL database, version 11 server
ii postgresql-client-11 11.10-1.pgdg18.04+1 amd64 front-end programs for PostgreSQL 11
ii postgresql-client-common 217.pgdg18.04+1 all manager for multiple PostgreSQL client versions
ii postgresql-common 217.pgdg18.04+1 all PostgreSQL database-cluster manager
ii postgresql-server-dev-11 11.10-1.pgdg18.04+1 amd64 development files for PostgreSQL 11 server-side programming

But gvmd picks header files from libpq-dev; which is recognized at version 13:

ii libpq-dev 13.1-1.pgdg18.04+1 amd64 header files for libpq5 (PostgreSQL library)

Since all of this are installed through official postgresql repos; I don’t understand this versioning. Why does postgresql-11 ships with libpq-dev-13 and does it have any impact on GVMD ? (since gvmd is recommended to use with postgresql-11)

I’m asking because I’m experiencing many lags & slownesses which may be linked to the fact gvmd not using the right postgresql version.

Any clarification would be helpful.

Thanks !

Looking at the Ubuntu packages (https://packages.ubuntu.com/search?keywords=libpq-dev) I am really sure there is something wrong at your side. The libpq-dev library version should match to the postgres server version. I suspect the package repo is broken. AFAIK this may cause the issues with the server you are facing currently.

1 Like

Indeed. I’ve removed installed libpq-dev and libpq5; and installed the one coming from PostgreSQL repository.

Due to dependencies issues, I couldn’t install the exact same version, but I could install at least a v11 version. Now I have:

root@ov-master-eqi:~# dpkg -l postgresql* | grep ^ii
ii postgresql-11 11.9-1.pgdg18.04+1 amd64 object-relational SQL database, version 11 server
ii postgresql-client-11 11.10-1.pgdg18.04+1 amd64 front-end programs for PostgreSQL 11
ii postgresql-client-common 217.pgdg18.04+1 all manager for multiple PostgreSQL client versions
ii postgresql-common 217.pgdg18.04+1 all PostgreSQL database-cluster manager
ii postgresql-server-dev-11 11.10-1.pgdg18.04+1 amd64 development files for PostgreSQL 11 server-side programming

and

ii libpq-dev 11.11-1.pgdg18.04+1 amd64 header files for libpq5 (PostgreSQL library)
ii libpq5:amd64 11.11-1.pgdg18.04+1 amd64 PostgreSQL C client library

I’ve rebuilt gvmd / gvm-libs and will monitor if that makes any difference. Now gvmd pick up PostgreSQL version 11 correctly.

On a test server I’ll try to fix the dependency issue and have same version number for all PostgreSQL packages.

Thanks

2 Likes

Hi There,

For the sake of references. I confirm rebuilding the latest stable release with Postgresql-11 & libpq-dev-11 librairies fixed the problem. Scans are not handled much more effectively and I havn’t noticed any longer lags and other performances issues.

I think the need of Postgresql 11 librairies should be mandatory for building from source. Too many problems are caused by incorrect librairies while the whole software suite is working somehow.

Best,

1 Like