Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upate pg_hint_plan on PostgreSQL 14-17 #858

Merged
merged 1 commit into from
Dec 17, 2024
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
23 changes: 23 additions & 0 deletions .github/workflows/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ jobs:
matrix:
ext: ${{ fromJson(needs.find_directories.outputs.directories).include }}
pg: [15]
exclude:
# pg_hint_plabn has separate extensions for each major version
- { ext: { name: pg_hint_plan14 } }
- { ext: { name: pg_hint_plan16 } }
- { ext: { name: pg_hint_plan17 } }
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
Expand All @@ -92,6 +97,24 @@ jobs:
matrix:
ext: ${{ fromJson(needs.find_directories.outputs.directories).include }}
pg: [17, 16, 15, 14]
exclude:
- { pg: 17, ext: { name: adminpack } } # Removed from Postgres 17
- { pg: 17, ext: { name: old_snapshot } } # Removed from Postgres 17
- { pg: 17, ext: { name: pg_lakehouse } } # Renamed pg_analytics
- { pg: 17, ext: { name: pg_sparse } } # Removed after v0.7.0
# pg_hint_plabn has separate extensions for each major version
- { pg: 17, ext: { name: pg_hint_plan14 } }
- { pg: 17, ext: { name: pg_hint_plan15 } }
- { pg: 17, ext: { name: pg_hint_plan16 } }
- { pg: 16, ext: { name: pg_hint_plan14 } }
- { pg: 16, ext: { name: pg_hint_plan15 } }
- { pg: 16, ext: { name: pg_hint_plan17 } }
- { pg: 15, ext: { name: pg_hint_plan14 } }
- { pg: 15, ext: { name: pg_hint_plan16 } }
- { pg: 15, ext: { name: pg_hint_plan17 } }
- { pg: 14, ext: { name: pg_hint_plan15 } }
- { pg: 14, ext: { name: pg_hint_plan16 } }
- { pg: 14, ext: { name: pg_hint_plan17 } }
env:
TRUNK_API_TOKEN: ${{ secrets.TRUNK_AUTH_TOKEN }}
PGHOST: "localhost"
Expand Down
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"