SUSE-Enceladus / public-cloud-info-service

Find IPs of service endpoints, and information about published images.
Apache License 2.0
5 stars 8 forks source link

Add a new route to retrieve the postgres server version #120

Closed KeithMnemonic closed 2 years ago

KeithMnemonic commented 2 years ago

This PR adds a new route '/db-server-version which enables the ability to retrieve the psql server version, This is needed for pint-data-manager so it can dynamically determine the correct version of pg_dump to use. Currently pint-data-manager incorrectly is set for

pg_dump = '/usr/lib/postgresql12/bin/pg_dump'

When testing upgrading the pint-server to PostgreSQL to version 14, an issue was found when running pint-data-manager due to the version mismatch between the psql server and pg_dump

Instead of just fixing this in pint-data-manager, it was suggested to make this a server function in case some other client would need access to the database server version.