Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions postgres-appliance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions postgres-appliance/build_scripts/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion postgres-appliance/scripts/basebackup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down