Install latest Postgres client version besides the one for PG_MAJOR (#729)
Before, if a remote server is upgraded to a newer PG version, it wouldn't be able to be backed up from inside the application, since `pg_dump` would be a lower version, resulting in this: ``` pg_dump: error: server version: 15.3; pg_dump version: 13.11 (Debian 13.11-1.pgdg110+1) pg_dump: error: aborting because of server version mismatch ``` With this change, `postgresql-${PG_MAJOR}` pulls in `postgresql-client` for the server version, AND `postgresql-client` metapackage pulls in the latest version available in the upstream Apt repository. This guarantees there will be a `pg_dump` for the latest version available, so a remote server freshly upgraded to that latest version will always be able to be backed up from inside the application (since [`pg_wrapper`](https://github.com/credativ/postgresql-common/blob/master/pg_wrapper#L110) chooses the latest locally available version for remote connections). * Bump Postgres client version ahead of Postgres server version bump * Fall back to PG_MAJOR if client env var is undefined * Use postgresql-client metapackage instead for latest client version
This commit is contained in:
parent
97ebba2902
commit
bc1383a622
|
@ -40,7 +40,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install autoconf build-essential c
|
|||
libssl-dev libyaml-dev libtool \
|
||||
libpcre3 libpcre3-dev zlib1g zlib1g-dev \
|
||||
libxml2-dev gawk parallel \
|
||||
postgresql-${PG_MAJOR} postgresql-client-${PG_MAJOR} \
|
||||
postgresql-${PG_MAJOR} postgresql-client \
|
||||
postgresql-contrib-${PG_MAJOR} libpq-dev postgresql-${PG_MAJOR}-pgvector \
|
||||
libreadline-dev anacron wget \
|
||||
psmisc whois brotli libunwind-dev \
|
||||
|
|
Loading…
Reference in New Issue