From 5f0b845d6711e967afeb2e4c5407247f1d23bd43 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 10 Feb 2022 22:05:00 -0800 Subject: [PATCH] Purge system postgresql-client To avoid shipping mixed versions of the PostgreSQL client, remove the system client before installing the PGDG version. --- scripts/install-postgresql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install-postgresql b/scripts/install-postgresql index 5b2040f..9c75107 100755 --- a/scripts/install-postgresql +++ b/scripts/install-postgresql @@ -6,6 +6,9 @@ POSTGRES_VERSION=${1:-12} DEBIAN_VERSION=${2:-buster} export DEBIAN_FRONTEND=noninteractive +# Uninstall the system client so that we don't have multiple versions +apt purge -y postgresql-client postgresql-client-common + curl -sS -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - echo "deb http://apt.postgresql.org/pub/repos/apt/ ${DEBIAN_VERSION}-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list