Skip to content

Commit

Permalink
Upate pg_hint_plan on PostgreSQL 14-17
Browse files Browse the repository at this point in the history
Include each as a separate extension, since each supports only a single
major version of PostgreSQL.
  • Loading branch information
theory committed Dec 17, 2024
1 parent 677014b commit c8040d2
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 18 deletions.
7 changes: 7 additions & 0 deletions contrib/pg_hint_plan14/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG PG_VERSION=14
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "REL14_$(perl -E 'print shift =~ s/\./_/gr' "${EXTENSION_VERSION}")" https://github.com/ossc-db/pg_hint_plan.git \
&& make -C pg_hint_plan
18 changes: 18 additions & 0 deletions contrib/pg_hint_plan14/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[extension]
name = "pg_hint_plan15"
version = "1.4.3"
repository = "https://github.com/ossc-db/pg_hint_plan"
license = "Copyright"
description = "pg_hint_plan makes it possible to tweak PostgreSQL execution plans."
homepage = "http://www.oss.ecl.ntt.co.jp/ossc/"
documentation = "https://github.com/ossc-db/pg_hint_plan"
categories = ["query_optimizations"]

[dependencies]
apt = ["libc6"]

[build]
postgres_version = "14"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = "make -C pg_hint_plan install"
7 changes: 7 additions & 0 deletions contrib/pg_hint_plan15/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG PG_VERSION=15
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "REL15_$(perl -E 'print shift =~ s/\./_/gr' "${EXTENSION_VERSION}")" https://github.com/ossc-db/pg_hint_plan.git \
&& make -C pg_hint_plan
18 changes: 18 additions & 0 deletions contrib/pg_hint_plan15/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[extension]
name = "pg_hint_plan15"
version = "1.5.2"
repository = "https://github.com/ossc-db/pg_hint_plan"
license = "Copyright"
description = "pg_hint_plan makes it possible to tweak PostgreSQL execution plans."
homepage = "http://www.oss.ecl.ntt.co.jp/ossc/"
documentation = "https://github.com/ossc-db/pg_hint_plan"
categories = ["query_optimizations"]

[dependencies]
apt = ["libc6"]

[build]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = "make -C pg_hint_plan install"
15 changes: 5 additions & 10 deletions contrib/pg_hint_plan16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
ARG PG_VERSION=15
ARG PG_VERSION=16
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/ossc-db/pg_hint_plan.git

ARG RELEASE=REL16_1_6_0

RUN cd pg_hint_plan && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "REL16_$(perl -E 'print shift =~ s/\./_/gr' "${EXTENSION_VERSION}")" https://github.com/ossc-db/pg_hint_plan.git \
&& make -C pg_hint_plan
11 changes: 3 additions & 8 deletions contrib/pg_hint_plan16/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "pg_hint_plan16"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/ossc-db/pg_hint_plan"
license = "Copyright"
description = "pg_hint_plan makes it possible to tweak PostgreSQL execution plans."
Expand All @@ -12,12 +12,7 @@ categories = ["query_optimizations"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "16"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pg_hint_plan && make install
set -x
mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension
mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib
"""
install_command = "make -C pg_hint_plan install"
7 changes: 7 additions & 0 deletions contrib/pg_hint_plan17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG PG_VERSION=16
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "REL17_$(perl -E 'print shift =~ s/\./_/gr' "${EXTENSION_VERSION}")" https://github.com/ossc-db/pg_hint_plan.git \
&& make -C pg_hint_plan
18 changes: 18 additions & 0 deletions contrib/pg_hint_plan17/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[extension]
name = "pg_hint_plan17"
version = "1.7.0"
repository = "https://github.com/ossc-db/pg_hint_plan"
license = "Copyright"
description = "pg_hint_plan makes it possible to tweak PostgreSQL execution plans."
homepage = "http://www.oss.ecl.ntt.co.jp/ossc/"
documentation = "https://github.com/ossc-db/pg_hint_plan"
categories = ["query_optimizations"]

[dependencies]
apt = ["libc6"]

[build]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = "make -C pg_hint_plan install"

0 comments on commit c8040d2

Please sign in to comment.