From 66bbf7340f7f16ee88d0a98421d5999bef90b1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Fei?= Date: Tue, 29 Oct 2024 15:13:26 +0100 Subject: [PATCH] feat: add wal2json extension (#193) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Niccolò Fei Signed-off-by: Jaime Silvela Co-authored-by: Jaime Silvela --- UBI/Dockerfile-multiarch.template | 8 ++++++-- UBI/Dockerfile-multilang.template | 1 + UBI/Dockerfile-postgis-multiarch.template | 4 ++++ UBI/Dockerfile-postgis-multilang.template | 1 + UBI/Dockerfile-postgis.template | 1 + UBI/Dockerfile.template | 1 + 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/UBI/Dockerfile-multiarch.template b/UBI/Dockerfile-multiarch.template index 25678c4b..ca6d8626 100644 --- a/UBI/Dockerfile-multiarch.template +++ b/UBI/Dockerfile-multiarch.template @@ -21,6 +21,7 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="pg_squeeze_%%PG_MAJOR%%" ; \ pgvector="pgvector_%%PG_MAJOR%%" ; \ pg_audit_pkg="pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%%" ; \ + wal2json_pkg="wal2json_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-%%UBI_MAJOR_VERSION%%-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ @@ -36,14 +37,16 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="edb-pg%%PG_MAJOR%%-pg-squeeze1" ; \ pgvector="edb-pg%%PG_MAJOR%%-pgvector0" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ - if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ; \ + wal2json_pkg="edb-pg%%PG_MAJOR%%-wal2json2" ;; \ s390x) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/edb/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg%%PG_MAJOR%%-pg-failover-slots1" ; \ pg_squeeze_pkg="edb-pg%%PG_MAJOR%%-pg-squeeze1" ; \ pgvector="edb-pg%%PG_MAJOR%%-pgvector0" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ - if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ; \ + wal2json_pkg="edb-pg%%PG_MAJOR%%-wal2json2" ;; \ *) \ exit 1 ;; \ esac ; \ @@ -60,6 +63,7 @@ RUN --mount=type=secret,id=cs_token \ "$pg_squeeze_pkg" \ "$pg_failover_slots_pkg" \ "$pgvector" \ + "$wal2json_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ rm -fr /tmp/* ; \ diff --git a/UBI/Dockerfile-multilang.template b/UBI/Dockerfile-multilang.template index 5c07db7b..4ffa2f5f 100644 --- a/UBI/Dockerfile-multilang.template +++ b/UBI/Dockerfile-multilang.template @@ -40,6 +40,7 @@ RUN set -xe ; \ pg_squeeze_%%PG_MAJOR%% \ "$pg_audit_pkg" \ pgvector_%%PG_MAJOR%% \ + wal2json_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-postgis-multiarch.template b/UBI/Dockerfile-postgis-multiarch.template index 7a5131c4..55519f9c 100644 --- a/UBI/Dockerfile-postgis-multiarch.template +++ b/UBI/Dockerfile-postgis-multiarch.template @@ -22,6 +22,7 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="pg_squeeze_%%PG_MAJOR%%" ; \ pgvector="pgvector_%%PG_MAJOR%%" ; \ pg_audit_pkg="pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%%" ; \ + wal2json_pkg="wal2json_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-%%UBI_MAJOR_VERSION%%-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ @@ -37,6 +38,7 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="edb-pg%%PG_MAJOR%%-pg-squeeze1" ; \ pgvector="edb-pg%%PG_MAJOR%%-pgvector0" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ + wal2json_pkg="edb-pg%%PG_MAJOR%%-wal2json2" ; \ if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ s390x) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/edb/setup.rpm.sh | bash ; \ @@ -44,6 +46,7 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="edb-pg%%PG_MAJOR%%-pg-squeeze1" ; \ pgvector="edb-pg%%PG_MAJOR%%-pgvector0" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ + wal2json_pkg="edb-pg%%PG_MAJOR%%-wal2json2" ; \ if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ *) \ exit 1 ;; \ @@ -61,6 +64,7 @@ RUN --mount=type=secret,id=cs_token \ "$pg_squeeze_pkg" \ "$pg_failover_slots_pkg" \ "$pgvector" \ + "$wal2json_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ rm -fr /tmp/* ; \ diff --git a/UBI/Dockerfile-postgis-multilang.template b/UBI/Dockerfile-postgis-multilang.template index aaafe3e2..17beb283 100644 --- a/UBI/Dockerfile-postgis-multilang.template +++ b/UBI/Dockerfile-postgis-multilang.template @@ -41,6 +41,7 @@ RUN set -xe ; \ pg_squeeze_%%PG_MAJOR%% \ "$pg_audit_pkg" \ pgvector_%%PG_MAJOR%% \ + wal2json_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-postgis.template b/UBI/Dockerfile-postgis.template index cab508e7..5f997670 100644 --- a/UBI/Dockerfile-postgis.template +++ b/UBI/Dockerfile-postgis.template @@ -40,6 +40,7 @@ RUN set -xe ; \ pg_squeeze_%%PG_MAJOR%% \ "$pg_audit_pkg" \ pgvector_%%PG_MAJOR%% \ + wal2json_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile.template b/UBI/Dockerfile.template index 8bb9c6b0..9260045e 100644 --- a/UBI/Dockerfile.template +++ b/UBI/Dockerfile.template @@ -39,6 +39,7 @@ RUN set -xe ; \ pg_squeeze_%%PG_MAJOR%% \ "$pg_audit_pkg" \ pgvector_%%PG_MAJOR%% \ + wal2json_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*'