Skip to content

Commit

Permalink
Update extensions for pg17
Browse files Browse the repository at this point in the history
  • Loading branch information
idanovinda committed Oct 1, 2024
1 parent 4fb24ad commit fc7de8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
3 changes: 1 addition & 2 deletions postgres-appliance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ ENV POSTGIS_VERSION=3.4 \
PLPROFILER=REL4_2_5 \
PG_PROFILE=4.7 \
PAM_OAUTH2=v1.0.1 \
PG_PERMISSIONS_COMMIT=f4b7c18676fa64236a1c8e28d34a35764e4a70e2 \
PG_STAT_KCACHE_COMMIT=97305e929294bb968d3b861b636650cc397764cd
PG_PERMISSIONS_COMMIT=f4b7c18676fa64236a1c8e28d34a35764e4a70e2

WORKDIR /builddeps
RUN bash base.sh
Expand Down
27 changes: 10 additions & 17 deletions postgres-appliance/build_scripts/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ curl -sL "https://github.com/zalando-pg/pg_auth_mon/archive/$PG_AUTH_MON_COMMIT.
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
curl -sL "https://github.com/powa-team/pg_stat_kcache/archive/$PG_STAT_KCACHE_COMMIT.tar.gz" | tar xz # pg17 support is not released
git clone https://github.com/timescale/timescaledb.git

apt-get install -y \
Expand All @@ -82,25 +81,25 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do
"postgresql-${version}-first-last-agg"
"postgresql-${version}-hll"
"postgresql-${version}-hypopg"
"postgresql-${version}-partman"
"postgresql-${version}-plproxy"
"postgresql-${version}-pgaudit"
"postgresql-${version}-pldebugger"
"postgresql-${version}-pglogical"
"postgresql-${version}-pglogical-ticker"
"postgresql-${version}-plpgsql-check"
"postgresql-${version}-pg-checksums"
"postgresql-${version}-pgl-ddl-deploy"
"postgresql-${version}-pgq-node"
"postgresql-${version}-postgis-${POSTGIS_VERSION%.*}"
"postgresql-${version}-postgis-${POSTGIS_VERSION%.*}-scripts"
"postgresql-${version}-repack"
"postgresql-${version}-wal2json"
"postgresql-${version}-pllua"
"postgresql-${version}-pgvector")

if [ "$version" != "17" ]; then
EXTRAS+=("postgresql-${version}-partman"
"postgresql-${version}-pglogical"
"postgresql-${version}-pglogical-ticker"
"postgresql-${version}-pg-checksums"
"postgresql-${version}-pgl-ddl-deploy"
"postgresql-${version}-postgis-${POSTGIS_VERSION%.*}"
"postgresql-${version}-postgis-${POSTGIS_VERSION%.*}-scripts"
"postgresql-${version}-repack"
"postgresql-${version}-decoderbufs")
EXTRAS+=("postgresql-${version}-decoderbufs")
fi

if [ "$WITH_PERL" = "true" ]; then
Expand All @@ -117,6 +116,7 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do
"postgresql-plpython3-${version}" \
"postgresql-server-dev-${version}" \
"postgresql-${version}-pgq3" \
"postgresql-${version}-pg-stat-kcache" \
"${EXTRAS[@]}"

# Install 3rd party stuff
Expand Down Expand Up @@ -166,7 +166,6 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do
set_user \
pg_permissions-${PG_PERMISSIONS_COMMIT} \
pg_profile-${PG_PROFILE} \
pg_stat_kcache-${PG_STAT_KCACHE_COMMIT} \
"${EXTRA_EXTENSIONS[@]}"; do
make -C "$n" USE_PGXS=1 clean install-strip
done
Expand All @@ -183,9 +182,6 @@ done

if [ "$DEMO" != "true" ]; then
for version in $DEB_PG_SUPPORTED_VERSIONS; do
if [ "$version" = "17" ]; then
continue
fi
# create postgis symlinks to make it possible to perform update
ln -s "postgis-${POSTGIS_VERSION%.*}.so" "/usr/lib/postgresql/${version}/lib/postgis-2.5.so"
done
Expand Down Expand Up @@ -267,9 +263,6 @@ if [ "$DEMO" != "true" ]; then
# relink files with the same name and content across different major versions
started=0
for v2 in $(find /usr/share/postgresql -type d -mindepth 1 -maxdepth 1 | sort -Vr); do
if [ "${v2##*/}" = "17" ]; then
continue
fi
if [ "$v1" = "$v2" ]; then
started=1
elif [ $started = 1 ]; then
Expand Down

0 comments on commit fc7de8a

Please sign in to comment.