From 0e6546fcae8d35cc162496095514f82a2d3c5f90 Mon Sep 17 00:00:00 2001 From: Polina Bungina <27892524+hughcapet@users.noreply.github.com> Date: Mon, 23 Feb 2026 09:44:03 +0100 Subject: [PATCH 1/2] Fix server version request in basebackup.sh (#1184) --- postgres-appliance/scripts/basebackup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/postgres-appliance/scripts/basebackup.sh b/postgres-appliance/scripts/basebackup.sh index 6e1622ee..d47cd292 100755 --- a/postgres-appliance/scripts/basebackup.sh +++ b/postgres-appliance/scripts/basebackup.sh @@ -19,6 +19,10 @@ done [[ -z $DATA_DIR || -z "$CONNSTR" || ! $RETRIES =~ ^[1-9]$ ]] && exit 1 +if [[ ! $CONNSTR =~ dbname= ]]; then + CONNSTR="${CONNSTR} dbname=postgres" +fi + if which pg_receivewal &> /dev/null; then PG_RECEIVEWAL=pg_receivewal PG_BASEBACKUP_OPTS=(-X none) @@ -95,7 +99,7 @@ else receivewal_pid=$(cat "$WAL_FAST/receivewal.pid") fi -PGVER=$(psql -d "$CONNSTR" -tAc "SELECT pg_catalog.current_setting('server_version_num')::int/10000" || echo 0) +PGVER=$(psql "$CONNSTR" -tAc "SELECT pg_catalog.current_setting('server_version_num')::int/10000" || echo 0) if [[ $PGVER -ge 15 ]]; then PG_BASEBACKUP_OPTS+=("--compress=server-lz4") fi From 3be0b6d52f08a336f5e31bfe8551745845ae366f Mon Sep 17 00:00:00 2001 From: Polina Bungina <27892524+hughcapet@users.noreply.github.com> Date: Tue, 24 Feb 2026 10:34:53 +0100 Subject: [PATCH 2/2] Update bg_mon, pg_mon, pg_profile, pg_permissions refs (#1185) * Update bg_mon, pg_mon, pg_profile, pg_permissions refs * Use pgdg for set_user and pg_permissions --- postgres-appliance/Dockerfile | 8 +++----- postgres-appliance/build_scripts/base.sh | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/postgres-appliance/Dockerfile b/postgres-appliance/Dockerfile index ec7920b7..6608483a 100644 --- a/postgres-appliance/Dockerfile +++ b/postgres-appliance/Dockerfile @@ -55,12 +55,10 @@ ARG DEB_PG_SUPPORTED_VERSIONS="$PGOLDVERSIONS $PGVERSION" ENV POSTGIS_VERSION=3.6 \ BG_MON_COMMIT=a73c6bcd10dfdf9feaf5eabab7eb6b12d167680d \ PG_AUTH_MON_COMMIT=fe099eef7662cbc85b0b79191f47f52f1e96b779 \ - PG_MON_COMMIT=13c12eeb946dc2c5537139ce75432fa62b06f0eb \ - SET_USER=REL4_1_0 \ + PG_MON_COMMIT=88ac7b58348aa061c814982defc170644f368f39 \ PLPROFILER=REL4_2_5 \ - PG_PROFILE=4.10 \ - PAM_OAUTH2=v1.0.1 \ - PG_PERMISSIONS_COMMIT=f4b7c18676fa64236a1c8e28d34a35764e4a70e2 + PG_PROFILE=4.11 \ + PAM_OAUTH2=v1.0.1 WORKDIR /builddeps RUN bash base.sh diff --git a/postgres-appliance/build_scripts/base.sh b/postgres-appliance/build_scripts/base.sh index 3b469fd6..bc4633d8 100644 --- a/postgres-appliance/build_scripts/base.sh +++ b/postgres-appliance/build_scripts/base.sh @@ -53,9 +53,7 @@ fi curl -sL "https://github.com/CyberDem0n/bg_mon/archive/$BG_MON_COMMIT.tar.gz" | tar xz curl -sL "https://github.com/zalando-pg/pg_auth_mon/archive/$PG_AUTH_MON_COMMIT.tar.gz" | tar xz -curl -sL "https://github.com/cybertec-postgresql/pg_permissions/archive/$PG_PERMISSIONS_COMMIT.tar.gz" | tar xz curl -sL "https://github.com/zubkov-andrei/pg_profile/archive/$PG_PROFILE.tar.gz" | tar xz -git clone -b "$SET_USER" https://github.com/pgaudit/set_user.git apt-get install -y \ postgresql-common \ @@ -124,6 +122,8 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do "postgresql-server-dev-${version}" \ "postgresql-${version}-pgq3" \ "postgresql-${version}-pg-stat-kcache" \ + "postgresql-${version}-pg-permissions" \ + "postgresql-${version}-set-user" \ "${EXTRAS[@]}" # Clean up timescaledb versions - keep at least 5 minor versions, but ensure compatibility with the lowest/oldest PG version (where possible) @@ -183,8 +183,6 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do for n in bg_mon-${BG_MON_COMMIT} \ pg_auth_mon-${PG_AUTH_MON_COMMIT} \ - set_user \ - pg_permissions-${PG_PERMISSIONS_COMMIT} \ pg_profile-${PG_PROFILE} \ "${EXTRA_EXTENSIONS[@]}"; do PATH="/usr/lib/postgresql/$version/bin:$PATH" make -C "$n" USE_PGXS=1 clean