diff --git a/13-3.4-bundle/bookworm/Dockerfile b/13-3.4-bundle/bookworm/Dockerfile index f5286ca3..845127d0 100644 --- a/13-3.4-bundle/bookworm/Dockerfile +++ b/13-3.4-bundle/bookworm/Dockerfile @@ -35,6 +35,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git ARG PGIS_V1_TIMESCALEDB_CHECKOUT=tags/2.12.0 ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1=ec99b00f18a6cc636fc7ff6e4bcff870d4201c90 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT=tags/REL13_1_3_9 +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1=bed874e573dc82ba6d3e81fb6176dbb52b6190d3 + FROM ${PGIS_V1_BASE_IMAGE} AS builder RUN set -ex \ @@ -62,6 +66,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -87,6 +93,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY ARG PGIS_V1_TIMESCALEDB_CHECKOUT ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1 + RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ @@ -181,14 +191,35 @@ RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git +# add add https://github.com/hydradatabase/hydra +RUN git clone --depth 1 https://github.com/hydradatabase/hydra \ + && cd hydra/columnar \ + && git checkout main \ + && ./configure \ + && make -j$(nproc) \ + && make install + + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS_V1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS_V1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install -#TODO: add https://github.com/hydradatabase/hydra +#TODO: add: # https://github.com/powa-team/pg_qualstats # https://github.com/darold/pgtt # https://github.com/apache/arrow-flight-sql-postgresql # https://github.com/neondatabase/pg_embedding/ # pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken +# pgrx + https://github.com/kelvich/pg_tiktoken # # -------------------------------------------------------------- @@ -318,7 +349,7 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ # add MobilityDB and TimescaleDB requirements - echo "shared_preload_libraries = 'postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ echo "timescaledb.telemetry_level=off" >> /usr/share/postgresql/postgresql.conf.sample diff --git a/14-3.4-bundle/bookworm/Dockerfile b/14-3.4-bundle/bookworm/Dockerfile index 5cde84a5..ae8f5750 100644 --- a/14-3.4-bundle/bookworm/Dockerfile +++ b/14-3.4-bundle/bookworm/Dockerfile @@ -35,6 +35,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git ARG PGIS_V1_TIMESCALEDB_CHECKOUT=tags/2.12.0 ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1=ec99b00f18a6cc636fc7ff6e4bcff870d4201c90 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT=tags/REL14_1_4_2 +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1=81e4f0f37966081bc1909db9796bfc1b1b5d2349 + FROM ${PGIS_V1_BASE_IMAGE} AS builder RUN set -ex \ @@ -62,6 +66,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -87,6 +93,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY ARG PGIS_V1_TIMESCALEDB_CHECKOUT ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1 + RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ @@ -181,14 +191,35 @@ RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git +# add add https://github.com/hydradatabase/hydra +RUN git clone --depth 1 https://github.com/hydradatabase/hydra \ + && cd hydra/columnar \ + && git checkout main \ + && ./configure \ + && make -j$(nproc) \ + && make install + + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS_V1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS_V1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install -#TODO: add https://github.com/hydradatabase/hydra +#TODO: add: # https://github.com/powa-team/pg_qualstats # https://github.com/darold/pgtt # https://github.com/apache/arrow-flight-sql-postgresql # https://github.com/neondatabase/pg_embedding/ # pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken +# pgrx + https://github.com/kelvich/pg_tiktoken # # -------------------------------------------------------------- @@ -318,7 +349,7 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ # add MobilityDB and TimescaleDB requirements - echo "shared_preload_libraries = 'postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ echo "timescaledb.telemetry_level=off" >> /usr/share/postgresql/postgresql.conf.sample diff --git a/15-3.4-bundle/bookworm/Dockerfile b/15-3.4-bundle/bookworm/Dockerfile index 698a68ba..81bb5166 100644 --- a/15-3.4-bundle/bookworm/Dockerfile +++ b/15-3.4-bundle/bookworm/Dockerfile @@ -35,6 +35,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git ARG PGIS_V1_TIMESCALEDB_CHECKOUT=tags/2.12.0 ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1=ec99b00f18a6cc636fc7ff6e4bcff870d4201c90 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT=tags/REL15_1_5_1 +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1=7a41e7ba94c8769895fefbb282f6943067adac2e + FROM ${PGIS_V1_BASE_IMAGE} AS builder RUN set -ex \ @@ -62,6 +66,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -87,6 +93,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY ARG PGIS_V1_TIMESCALEDB_CHECKOUT ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1 + RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ @@ -181,14 +191,35 @@ RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git +# add add https://github.com/hydradatabase/hydra +RUN git clone --depth 1 https://github.com/hydradatabase/hydra \ + && cd hydra/columnar \ + && git checkout main \ + && ./configure \ + && make -j$(nproc) \ + && make install + + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS_V1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS_V1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install -#TODO: add https://github.com/hydradatabase/hydra +#TODO: add: # https://github.com/powa-team/pg_qualstats # https://github.com/darold/pgtt # https://github.com/apache/arrow-flight-sql-postgresql # https://github.com/neondatabase/pg_embedding/ # pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken +# pgrx + https://github.com/kelvich/pg_tiktoken # # -------------------------------------------------------------- @@ -318,7 +349,7 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ # add MobilityDB and TimescaleDB requirements - echo "shared_preload_libraries = 'postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ echo "timescaledb.telemetry_level=off" >> /usr/share/postgresql/postgresql.conf.sample diff --git a/16-3.4-bundle/bookworm/Dockerfile b/16-3.4-bundle/bookworm/Dockerfile index 383cc568..3f08c96e 100644 --- a/16-3.4-bundle/bookworm/Dockerfile +++ b/16-3.4-bundle/bookworm/Dockerfile @@ -35,6 +35,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git ARG PGIS_V1_TIMESCALEDB_CHECKOUT=tags/2.12.0 ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1=ec99b00f18a6cc636fc7ff6e4bcff870d4201c90 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT=tags/REL16_1_6_0 +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1=fa0a461af929c06f7c96956369458456c26e7ad9 + FROM ${PGIS_V1_BASE_IMAGE} AS builder RUN set -ex \ @@ -62,6 +66,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -87,6 +93,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY ARG PGIS_V1_TIMESCALEDB_CHECKOUT ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1 + RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ @@ -157,14 +167,29 @@ RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git +# PG16 + hydra not supperted https://github.com/hydradatabase/hydra + + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS_V1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS_V1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install -#TODO: add https://github.com/hydradatabase/hydra +#TODO: add: # https://github.com/powa-team/pg_qualstats # https://github.com/darold/pgtt # https://github.com/apache/arrow-flight-sql-postgresql # https://github.com/neondatabase/pg_embedding/ # pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken +# pgrx + https://github.com/kelvich/pg_tiktoken # # -------------------------------------------------------------- @@ -297,7 +322,7 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ # add MobilityDB requirements; ( TimescaleDB not yet supported on pg16 ) - echo "shared_preload_libraries = 'postgis-3,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ echo "timescaledb.telemetry_level=off" >> /usr/share/postgresql/postgresql.conf.sample diff --git a/Dockerfile.bundle.template b/Dockerfile.bundle.template index 4a2cc2c2..a4432714 100644 --- a/Dockerfile.bundle.template +++ b/Dockerfile.bundle.template @@ -30,6 +30,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git ARG PGIS_V1_TIMESCALEDB_CHECKOUT={{ .[env.variant].TIMESCALEDB_CHECKOUT }} ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1={{ .[env.variant].TIMESCALEDB_CHECKOUT_SHA1 }} +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT={{ .[env.variant].PG_HINT_PLAN_CHECKOUT }} +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1={{ .[env.variant].PG_HINT_PLAN_CHECKOUT_SHA1 }} + FROM ${PGIS_V1_BASE_IMAGE} AS builder RUN set -ex \ @@ -57,6 +61,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -82,6 +88,10 @@ ARG PGIS_V1_TIMESCALEDB_REPOSITORY ARG PGIS_V1_TIMESCALEDB_CHECKOUT ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS_V1_PG_HINT_PLAN_REPOSITORY +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT +ARG PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1 + RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ @@ -185,14 +195,39 @@ RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git +{{ if env.version | startswith("16") then ( -}} +# PG16 + hydra not supperted https://github.com/hydradatabase/hydra +{{ ) else ( -}} +# add add https://github.com/hydradatabase/hydra +RUN git clone --depth 1 https://github.com/hydradatabase/hydra \ + && cd hydra/columnar \ + && git checkout main \ + && ./configure \ + && make -j$(nproc) \ + && make install +{{ ) end -}} + + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS_V1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS_V1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install -#TODO: add https://github.com/hydradatabase/hydra +#TODO: add: # https://github.com/powa-team/pg_qualstats # https://github.com/darold/pgtt # https://github.com/apache/arrow-flight-sql-postgresql # https://github.com/neondatabase/pg_embedding/ # pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken +# pgrx + https://github.com/kelvich/pg_tiktoken # # -------------------------------------------------------------- @@ -335,10 +370,10 @@ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ {{ if env.version | startswith("16") then ( -}} # add MobilityDB requirements; ( TimescaleDB not yet supported on pg16 ) - echo "shared_preload_libraries = 'postgis-3,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ {{ ) else ( -}} # add MobilityDB and TimescaleDB requirements - echo "shared_preload_libraries = 'postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ {{ ) end -}} # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ diff --git a/README.md b/README.md index a6e7c560..4776a7f5 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This image ensures that the default database created by the parent `postgres` im Unless `-e POSTGRES_DB` is passed to the container at startup time, this database will be named after the admin user (either `postgres` or the user specified with `-e POSTGRES_USER`). If you would prefer to use the older template database mechanism for enabling PostGIS, the image also provides a PostGIS-enabled template database called `template_postgis`. -## Versions (2023-10-08) +## Versions (2023-10-09) We provide multi-platform image support for the following architectures: diff --git a/versions.json b/versions.json index 7bdc5412..b309279c 100644 --- a/versions.json +++ b/versions.json @@ -127,6 +127,8 @@ "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", "TIMESCALEDB_CHECKOUT": "tags/2.12.0", "TIMESCALEDB_CHECKOUT_SHA1": "ec99b00f18a6cc636fc7ff6e4bcff870d4201c90", + "PG_HINT_PLAN_CHECKOUT": "tags/REL13_1_3_9", + "PG_HINT_PLAN_CHECKOUT_SHA1": "bed874e573dc82ba6d3e81fb6176dbb52b6190d3", "POSTGIS_MAJOR": "3", "POSTGIS_VERSION": "3.4.0+dfsg-1.pgdg120+1" } @@ -185,6 +187,8 @@ "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", "TIMESCALEDB_CHECKOUT": "tags/2.12.0", "TIMESCALEDB_CHECKOUT_SHA1": "ec99b00f18a6cc636fc7ff6e4bcff870d4201c90", + "PG_HINT_PLAN_CHECKOUT": "tags/REL14_1_4_2", + "PG_HINT_PLAN_CHECKOUT_SHA1": "81e4f0f37966081bc1909db9796bfc1b1b5d2349", "POSTGIS_MAJOR": "3", "POSTGIS_VERSION": "3.4.0+dfsg-1.pgdg120+1" } @@ -243,6 +247,8 @@ "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", "TIMESCALEDB_CHECKOUT": "tags/2.12.0", "TIMESCALEDB_CHECKOUT_SHA1": "ec99b00f18a6cc636fc7ff6e4bcff870d4201c90", + "PG_HINT_PLAN_CHECKOUT": "tags/REL15_1_5_1", + "PG_HINT_PLAN_CHECKOUT_SHA1": "7a41e7ba94c8769895fefbb282f6943067adac2e", "POSTGIS_MAJOR": "3", "POSTGIS_VERSION": "3.4.0+dfsg-1.pgdg120+1" } @@ -349,6 +355,8 @@ "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", "TIMESCALEDB_CHECKOUT": "tags/2.12.0", "TIMESCALEDB_CHECKOUT_SHA1": "ec99b00f18a6cc636fc7ff6e4bcff870d4201c90", + "PG_HINT_PLAN_CHECKOUT": "tags/REL16_1_6_0", + "PG_HINT_PLAN_CHECKOUT_SHA1": "fa0a461af929c06f7c96956369458456c26e7ad9", "POSTGIS_MAJOR": "3", "POSTGIS_VERSION": "3.4.0+dfsg-1.pgdg120+1" } diff --git a/versions.sh b/versions.sh index b433b554..fb1492b3 100755 --- a/versions.sh +++ b/versions.sh @@ -153,26 +153,34 @@ postgisGitHash="$(git ls-remote https://github.com/postgis/postgis.git heads/mas # Function to get the latest version tag and its SHA1 hash get_latest_version_and_hash() { # Argument 1: Repository URL - local repo_url=$1 + local repo_url="$1" # Argument 2: Repository identifier - local repo_id=$2 + local repo_id="$2" + # Argumnet 3: tag filter - optional + local repo_only="${3:-}" + echo "[+] Checking lastversion : $repo_id - $repo_url" # Fetch the latest version tag using the lastversion command - eval "lastversion_${repo_id}=$(lastversion --format tag --pre "${repo_url}")" + + if [ -z "$repo_only" ]; then + eval "lastversion_${repo_id}=$(lastversion --format tag --pre "${repo_url}")" + else + eval "lastversion_${repo_id}${repo_only}=$(lastversion --format tag --pre --only "${repo_only}" "${repo_url}")" + fi # Intermediary step to resolve the variable name - local var_name="lastversion_${repo_id}" + local var_name="lastversion_${repo_id}${repo_only}" local last_version=${!var_name} # Fetch the SHA1 hash of the tag using the get_tag_hash function - eval "lastversion_${repo_id}_sha1=$(get_tag_hash "${repo_url}" "${last_version}")" + eval "lastversion_${repo_id}${repo_only}_sha1=$(get_tag_hash "${repo_url}" "${last_version}")" #creating new variables for using later .. - echo " lastversion_${repo_id} = ${last_version}" + echo " lastversion_${repo_id}${repo_only} = ${last_version}" - local sha1_var_name="lastversion_${repo_id}_sha1" + local sha1_var_name="lastversion_${repo_id}${repo_only}_sha1" local sha1_value=${!sha1_var_name} - echo " lastversion_${repo_id}_sha1 = ${sha1_value}" + echo " lastversion_${repo_id}${repo_only}_sha1 = ${sha1_value}" echo " " } @@ -188,6 +196,11 @@ get_latest_version_and_hash "https://github.com/OSGeo/gdal" "gdal" get_latest_version_and_hash "https://github.com/OSGeo/PROJ" "proj" get_latest_version_and_hash "https://gitlab.com/Oslandia/SFCGAL" "sfcgal" +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" REL16 +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" REL15 +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" REL14 +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" REL13 + #------------------------------------------- function fetch_postgis_versions() { @@ -534,6 +547,12 @@ for version in "${versions[@]}"; do printf " TIMESCALEDB_CHECKOUT: 'tags/%s'\n" "$lastversion_timescaledb" printf " TIMESCALEDB_CHECKOUT_SHA1: '%s'\n" "$lastversion_timescaledb_sha1" + + lastversion_pg_hint_plan="lastversion_pg_hint_planREL${postgresVersion}" + lastversion_pg_hint_plan_sha1="lastversion_pg_hint_planREL${postgresVersion}_sha1" + printf " PG_HINT_PLAN_CHECKOUT: 'tags/%s'\n" "${!lastversion_pg_hint_plan}" + printf " PG_HINT_PLAN_CHECKOUT_SHA1: '%s'\n" "${!lastversion_pg_hint_plan_sha1}" + fi printf " POSTGIS_MAJOR: '%s'\n" "${postgisMajor[$variant]}"