From d170d49a0e92f7804e67f9756a06a14786eac262 Mon Sep 17 00:00:00 2001 From: Polina Bungina <27892524+hughcapet@users.noreply.github.com> Date: Mon, 13 Nov 2023 17:08:51 +0100 Subject: [PATCH] Adjust extensions build/installation process for pg16 (#945) * Build plprofiler from source * More extensions support pg16: plprofiler, pgl-ddl-deploy * Small refactoring, as we don't include pg10 anymore: always install/build decoderbufs, pgvector, pg_mon; never install amcheck (it is in contrib); no need in $POSTGIS_SUPER_LEGACY. * Remove pg_tm_aux, plantuner * Pllua was accidentally not installed for pg15 --- postgres-appliance/Dockerfile | 9 ++-- postgres-appliance/build_scripts/base.sh | 49 ++++-------------- ...1bc85da64ff3ef66e12aed1d4e1e54fc006.tar.gz | Bin 5836 -> 0 bytes 3 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 postgres-appliance/dependencies/src/plantuner-800d81bc85da64ff3ef66e12aed1d4e1e54fc006.tar.gz diff --git a/postgres-appliance/Dockerfile b/postgres-appliance/Dockerfile index a1db8cb11..b3fb5c72f 100644 --- a/postgres-appliance/Dockerfile +++ b/postgres-appliance/Dockerfile @@ -39,7 +39,7 @@ RUN bash /builddeps/prepare.sh COPY --from=ubuntu-18 /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.18 -COPY cron_unprivileged.c dependencies/src /builddeps/ +COPY cron_unprivileged.c /builddeps/ COPY build_scripts/base.sh /builddeps/ COPY --from=dependencies-builder /builddeps/*.deb /builddeps/ @@ -56,17 +56,14 @@ ARG DEB_PG_SUPPORTED_VERSIONS="$PGOLDVERSIONS $PGVERSION" # Install PostgreSQL, extensions and contribs ENV POSTGIS_VERSION=3.4 \ POSTGIS_LEGACY=3.3 \ - POSTGIS_SUPER_LEGACY=3.2 \ BG_MON_COMMIT=5959310104a11cb3f363bd65f3a4ef01119ca6d6 \ PG_AUTH_MON_COMMIT=3d010e5959285c32b155e8064c9c9b57869aeca7 \ PG_MON_COMMIT=382304bd6fa4804b2bea26c9bd9d420b3a998747 \ SET_USER=REL4_0_1 \ - PLPROFILER=fix/pg15-shmem \ + PLPROFILER=REL4_2_4 \ PG_PROFILE=4.2 \ PAM_OAUTH2=v1.0.1 \ - PLANTUNER_COMMIT=800d81bc85da64ff3ef66e12aed1d4e1e54fc006 \ - PG_PERMISSIONS_COMMIT=314b9359e3d77c0b2ef7dbbde97fa4be80e31925 \ - PG_TM_AUX_COMMIT=51cf42f6043608919802fcc48458471d0ea3a127 + PG_PERMISSIONS_COMMIT=314b9359e3d77c0b2ef7dbbde97fa4be80e31925 WORKDIR /builddeps RUN bash base.sh diff --git a/postgres-appliance/build_scripts/base.sh b/postgres-appliance/build_scripts/base.sh index dd0f660e6..7f25a63a0 100644 --- a/postgres-appliance/build_scripts/base.sh +++ b/postgres-appliance/build_scripts/base.sh @@ -35,8 +35,7 @@ else make -C pam-oauth2 install # prepare 3rd sources - git clone -b "$PLPROFILER" https://github.com/hughcapet/plprofiler.git - tar -xzf "plantuner-${PLANTUNER_COMMIT}.tar.gz" + git clone -b "$PLPROFILER" https://github.com/bigsql/plprofiler.git curl -sL "https://github.com/zalando-pg/pg_mon/archive/$PG_MON_COMMIT.tar.gz" | tar xz for p in python3-keyring python3-docutils ieee-data; do @@ -55,7 +54,6 @@ fi curl -sL "https://github.com/zalando-pg/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/hughcapet/pg_tm_aux/archive/$PG_TM_AUX_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 git clone https://github.com/timescale/timescaledb.git @@ -91,36 +89,20 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do "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") - - if [ "$version" != "16" ]; then - EXTRAS+=("postgresql-${version}-pgl-ddl-deploy") - fi - - if [ "$version" != "15" ]; then - # not yet present for pg15 - EXTRAS+=("postgresql-${version}-pllua") - fi + "postgresql-${version}-wal2json" + "postgresql-${version}-decoderbufs" + "postgresql-${version}-pllua" + "postgresql-${version}-pgvector") if [ "$WITH_PERL" = "true" ]; then EXTRAS+=("postgresql-plperl-${version}") fi - if [ "${version%.*}" -ge 10 ]; then - EXTRAS+=("postgresql-${version}-decoderbufs") - fi - - if [ "${version%.*}" -ge 11 ]; then - EXTRAS+=("postgresql-${version}-pgvector") - fi - - if [ "${version%.*}" -lt 11 ]; then - EXTRAS+=("postgresql-${version}-amcheck") - fi fi # Install PostgreSQL binaries, contrib, plproxy and multiple pl's @@ -139,7 +121,7 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do # use subshell to avoid having to cd back (SC2103) ( cd timescaledb - if [ "$version" != "16 " ]; then + if [ "$version" != "16" ]; then for v in $TIMESCALEDB; do git checkout "$v" sed -i "s/VERSION 3.11/VERSION 3.10/" CMakeLists.txt @@ -173,12 +155,7 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do EXTRA_EXTENSIONS=() if [ "$DEMO" != "true" ]; then - if [ "$version" != "16" ]; then - EXTRA_EXTENSIONS+=("plantuner-${PLANTUNER_COMMIT}" plprofiler "pg_tm_aux-${PG_TM_AUX_COMMIT}") - fi - if [ "${version%.*}" -ge 10 ]; then - EXTRA_EXTENSIONS+=("pg_mon-${PG_MON_COMMIT}") - fi + EXTRA_EXTENSIONS+=("plprofiler") fi for n in bg_mon-${BG_MON_COMMIT} \ @@ -186,6 +163,7 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do set_user \ pg_permissions-${PG_PERMISSIONS_COMMIT} \ pg_profile-${PG_PROFILE} \ + pg_mon-${PG_MON_COMMIT} \ "${EXTRA_EXTENSIONS[@]}"; do make -C "$n" USE_PGXS=1 clean install-strip done @@ -286,17 +264,12 @@ if [ "$DEMO" != "true" ]; then if [ "$v1" = "$v2" ]; then started=1 elif [ $started = 1 ]; then - - used_postgis_version=$POSTGIS_VERSION - if [ "${v1##*/}" = "11" ]; then used_postgis_version=$POSTGIS_LEGACY; fi - - for d1 in extension contrib contrib/postgis-$used_postgis_version; do + for d1 in extension contrib contrib/postgis-$POSTGIS_VERSION; do cd "$v1/$d1" d2="$d1" d1="../../${v1##*/}/$d1" if [ "${d2%-*}" = "contrib/postgis" ]; then - if [ "${v2##*/}" = "11" ]; then d2="${d2%-*}-$POSTGIS_LEGACY" - elif [ "${v2##*/}" = "10" ]; then d2="${d2%-*}-$POSTGIS_SUPER_LEGACY"; fi + if [ "${v2##*/}" = "11" ]; then d2="${d2%-*}-$POSTGIS_LEGACY"; fi d1="../$d1" fi d2="$v2/$d2" diff --git a/postgres-appliance/dependencies/src/plantuner-800d81bc85da64ff3ef66e12aed1d4e1e54fc006.tar.gz b/postgres-appliance/dependencies/src/plantuner-800d81bc85da64ff3ef66e12aed1d4e1e54fc006.tar.gz deleted file mode 100644 index 6c8365d69f0461e68b269e61e2eac1c684bc73fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5836 zcmV;-7BlG|iwFRa!Ny(y1MFShxJ zVTIIyVj(e-@Z;X(f4^UKw}d2wA9>Bp9qXKlQ9r7xtE#KNu9h@2$8f{B%l*wCs#WWU z+R*%A&ocIRN247++TZ83ZG&4iYnRvf-tNe(R`<7_JoKvKdj5Qm{??xFRg-_C>q%{A zf4{c3Tix4#{-nCSU434C!uB4_=@YJb5E?#XPmGKC#XOi?*lvEiyXya>*X-f;=hriC zhTOWhBiz&e+co;NO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