From e1dc4ddf3867538a9d9af523ecb4fd82adad87f5 Mon Sep 17 00:00:00 2001 From: huangzhangshu Date: Wed, 26 Feb 2025 16:34:47 +0800 Subject: [PATCH] chore: support wal2json v2.6 --- postgres-appliance/Dockerfile | 4 ++++ postgres-appliance/build_scripts/base.sh | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/postgres-appliance/Dockerfile b/postgres-appliance/Dockerfile index a0739f97..34367117 100644 --- a/postgres-appliance/Dockerfile +++ b/postgres-appliance/Dockerfile @@ -1,6 +1,8 @@ ARG BASE_IMAGE=ubuntu:22.04 ARG PGVERSION=16 ARG PGVECTOR="v0.8.0" +ARG PGJWT="v0.2.0" +ARG PGWAL2JSON="v2.6" ARG TIMESCALEDB="2.11.2 2.14.2" ARG DEMO=false ARG COMPRESS=false @@ -49,6 +51,8 @@ ARG TIMESCALEDB ARG TIMESCALEDB_APACHE_ONLY=true ARG TIMESCALEDB_TOOLKIT=true ARG PGVECTOR +ARG PGJWT +ARG PGWAL2JSON ARG COMPRESS ARG PGOLDVERSIONS="12 13 14 15 16" ARG WITH_PERL=false diff --git a/postgres-appliance/build_scripts/base.sh b/postgres-appliance/build_scripts/base.sh index f73db556..7d0a2a26 100644 --- a/postgres-appliance/build_scripts/base.sh +++ b/postgres-appliance/build_scripts/base.sh @@ -63,6 +63,8 @@ curl -sL "https://github.com/zubkov-andrei/pg_profile/archive/$PG_PROFILE.tar.gz git clone -b "$SET_USER" https://github.com/pgaudit/set_user.git git clone https://github.com/timescale/timescaledb.git git clone https://github.com/pgvector/pgvector.git +git clone https://github.com/michelp/pgjwt +git clone https://github.com/eulerto/wal2json.git apt-get install -y \ postgresql-common \ @@ -161,6 +163,25 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do done ) + # install pgjwt + ( + cd pgjwt + export PG_CONFIG="/usr/lib/postgresql/$version/bin/pg_config" + make OPTFLAGS="" && make install + git reset --hard + git clean -f -d + ) + + # install wal2json + ( + sudo apt-get install postgresql-server-dev-$version + cd wal2json + export PG_CONFIG="/usr/lib/postgresql/$version/bin/pg_config" + make OPTFLAGS="" && make install + git reset --hard + git clean -f -d + ) + if [ "${TIMESCALEDB_APACHE_ONLY}" != "true" ] && [ "${TIMESCALEDB_TOOLKIT}" = "true" ]; then __versionCodename=$(sed