Skip to content

Commit

Permalink
Update 11 more extension for Postgres 17 (#862)
Browse files Browse the repository at this point in the history
Update the build scripting for these extensions, downloading from PGXN
where possible:

*   pg_mon
*   pg_orphaned
*   pg_partman
*   pg_permissions
*   pg_proctab
*   pg_quack
*   pg_qualstats
*   pg_rational
*   pg_repack
*   pg_roaringbitmap
*   pg_savior

Upgrade these extensions:

*   pg_partman v5.2.2
*   pg_permissions v1.3.0
*   pg_proctab v0.0.12
*   pg_qualstats v2.1.1
*   pg_repack v1.5.2
*   pg_roaringbitmap v0.5.4

Pin these extensions that have no releases or tags to specific commits:

*   pg_mon
*   pg_orphaned
*   pg_savior
  • Loading branch information
theory committed Dec 18, 2024
1 parent b140a1a commit 8d5f248
Show file tree
Hide file tree
Showing 22 changed files with 106 additions and 206 deletions.
18 changes: 8 additions & 10 deletions contrib/pg_mon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/RafiaSabih/pg_mon.git

ARG RELEASE=master

RUN cd pg_mon && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
ARG EXTENSION_NAME
# ARG EXTENSION_VERSION
ARG RELEASE=d34b316
RUN git clone https://github.com/RafiaSabih/${EXTENSION_NAME}.git \
&& cd ${EXTENSION_NAME} \
&& git checkout ${RELEASE} \
&& make
8 changes: 1 addition & 7 deletions contrib/pg_mon/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ description = "PostgreSQL extension to enhance query monitoring."
documentation = "https://github.com/RafiaSabih/pg_mon"
categories = ["query_optimizations"]


[dependencies]
apt = ["libc6"]

[build]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pg_mon && 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_mon install"
16 changes: 8 additions & 8 deletions contrib/pg_orphaned/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Set PostgreSQL version
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Clone repository
RUN git clone https://github.com/bdrouvot/pg_orphaned.git

# Build extension
RUN cd pg_orphaned && \
make
ARG EXTENSION_NAME
# ARG EXTENSION_VERSION
ARG RELEASE=62a222f
RUN git clone https://github.com/bdrouvot/${EXTENSION_NAME}.git \
&& cd ${EXTENSION_NAME} \
&& git checkout ${RELEASE} \
&& make
9 changes: 2 additions & 7 deletions contrib/pg_orphaned/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ documentation = "https://github.com/bdrouvot/pg_orphaned"
categories = ["data_transformations"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pg_orphaned && 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_orphaned install"
16 changes: 7 additions & 9 deletions contrib/pg_partman/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
ARG PG_VERSION=17
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/pgpartman/pg_partman.git

# Download and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION

RUN cd pg_partman && \
git fetch origin v${EXTENSION_VERSION} && \
git checkout v${EXTENSION_VERSION} && \
make
RUN curl -O https://api.pgxn.org/dist/${EXTENSION_NAME}/${EXTENSION_VERSION}/${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
&& unzip ${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
&& cd ${EXTENSION_NAME}-${EXTENSION_VERSION} && make
WORKDIR /app/${EXTENSION_NAME}-${EXTENSION_VERSION}
9 changes: 2 additions & 7 deletions contrib/pg_partman/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "pg_partman"
version = "5.2.1"
version = "5.2.2"
repository = "https://github.com/pgpartman/pg_partman"
license = "PostgreSQL"
description = "Extension to manage partitioned tables by time or ID."
Expand All @@ -15,9 +15,4 @@ apt = ["libc6"]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pg_partman && 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 install"
18 changes: 6 additions & 12 deletions contrib/pg_permissions/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# Set PostgreSQL version
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/cybertec-postgresql/pg_permissions.git

# Set project version
ARG RELEASE=REL_1_1

# Build extension
RUN cd pg_permissions && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "REL_$(perl -E 'print shift =~ s/[.]0$//r =~ s/[.]/_/gr' "${EXTENSION_VERSION}")" https://github.com/cybertec-postgresql/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
11 changes: 3 additions & 8 deletions contrib/pg_permissions/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "pg_permissions"
version = "1.1.0"
version = "1.3.0"
repository = "https://github.com/cybertec-postgresql/pg_permissions"
license = "Copyright"
description = "A simple set of views to see ALL permissions in a PostgreSQL database."
Expand All @@ -9,12 +9,7 @@ documentation = "https://github.com/cybertec-postgresql/pg_permissions"
categories = ["tooling_admin"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pg_permissions && 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_permissions install"
25 changes: 9 additions & 16 deletions contrib/pg_proctab/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
USER root
RUN apt-get update && apt-get install -y \
build-essential \
libreadline-dev \
Expand All @@ -15,17 +15,10 @@ RUN apt-get update && apt-get install -y \
xsltproc \
ccache

# Clone repository
RUN git clone https://github.com/postgres/postgres.git

ARG PG_RELEASE=REL_15_3

# Build extension
RUN cd postgres && \
git fetch origin ${PG_RELEASE} && \
git checkout ${PG_RELEASE} && \
./configure && \
cd contrib && \
git clone https://gitlab.com/pg_proctab/pg_proctab.git && \
cd pg_proctab && \
make USE_PGXS=1
# Download and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN curl -O https://api.pgxn.org/dist/${EXTENSION_NAME}/${EXTENSION_VERSION}/${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
&& unzip ${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
&& cd ${EXTENSION_NAME}-${EXTENSION_VERSION} && make USE_PGXS=1
WORKDIR /app/${EXTENSION_NAME}-${EXTENSION_VERSION}
11 changes: 3 additions & 8 deletions contrib/pg_proctab/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "pg_proctab"
version = "0.0.10"
version = "0.0.12"
repository = "https://gitlab.com/pg_proctab/pg_proctab"
license = "Copyright"
description = "Access operating system process table."
Expand All @@ -12,12 +12,7 @@ categories = ["metrics"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgres/contrib/pg_proctab && make USE_PGXS=1 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 install USE_PGXS=1"
17 changes: 6 additions & 11 deletions contrib/pg_quack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Clone repository
RUN git clone https://github.com/hydradatabase/pg_quack.git

ARG RELEASE=v0.0.1

RUN cd pg_quack && \
git checkout ${RELEASE} && \
make

# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/hydradatabase/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
8 changes: 1 addition & 7 deletions contrib/pg_quack/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ homepage = "https://www.hydra.so"
documentation = "https://github.com/hydradatabase/pg_quack"
categories = ["connectors"]


[dependencies]
apt = ["libc6"]

[build]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pg_quack && 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_quack install"
18 changes: 6 additions & 12 deletions contrib/pg_qualstats/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# Set PostgreSQL version
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/powa-team/pg_qualstats.git

# Set project version
ARG RELEASE=2.0.4

# Build extension
RUN cd pg_qualstats && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/powa-team/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
11 changes: 3 additions & 8 deletions contrib/pg_qualstats/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "pg_qualstats"
version = "2.0.4"
version = "2.1.1"
repository = "https://github.com/powa-team/pg_qualstats"
license = "Copyright"
description = "pg_qualstats is a PostgreSQL extension keeping statistics on predicates found in WHERE statements and JOIN clauses."
Expand All @@ -13,12 +13,7 @@ preload_libraries = ["pg_qualstats"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pg_qualstats && 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_qualstats install"
18 changes: 6 additions & 12 deletions contrib/pg_rational/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# Set PostgreSQL version
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/begriffs/pg_rational.git

# Set project version
ARG RELEASE=v0.0.2

# Build extension
RUN cd pg_rational && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/begriffs/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
9 changes: 2 additions & 7 deletions contrib/pg_rational/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ categories = ["analytics"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pg_rational && 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_rational install"
23 changes: 8 additions & 15 deletions contrib/pg_repack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG PG_VERSION=15
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
USER root
RUN apt-get update && apt-get install -y \
build-essential \
libreadline-dev \
Expand All @@ -17,17 +17,10 @@ RUN apt-get update && apt-get install -y \
libzstd-dev \
liblz4-dev

# Clone repository
RUN git clone https://github.com/postgres/postgres.git

ARG PG_RELEASE=REL_15_3

# Build extension
RUN cd postgres && \
git fetch origin ${PG_RELEASE} && \
git checkout ${PG_RELEASE} && \
./configure && \
cd contrib && \
git clone https://github.com/reorg/pg_repack.git && \
cd pg_repack && \
make USE_PGXS=1
# Extension build dependencies
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN curl -O https://api.pgxn.org/dist/${EXTENSION_NAME}/${EXTENSION_VERSION}/${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
&& unzip ${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
&& cd ${EXTENSION_NAME}-${EXTENSION_VERSION} && make
WORKDIR /app/${EXTENSION_NAME}-${EXTENSION_VERSION}
11 changes: 3 additions & 8 deletions contrib/pg_repack/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "pg_repack"
version = "1.4.8"
version = "1.5.2"
repository = "https://github.com/reorg/pg_repack"
license = "BSD-3-Clause"
description = "pg_repack is a PostgreSQL extension which lets you remove bloat from tables and indexes, and optionally restore the physical order of clustered indexes."
Expand All @@ -11,12 +11,7 @@ categories = ["index_table_optimizations"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgres/contrib/pg_repack && make USE_PGXS=1 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 install"
Loading

0 comments on commit 8d5f248

Please sign in to comment.