diff --git a/bitnami/postgresql-repmgr/13/debian-12/Dockerfile b/bitnami/postgresql-repmgr/13/debian-12/Dockerfile index 45ad52b4ed78..0307d9bcd9c4 100644 --- a/bitnami/postgresql-repmgr/13/debian-12/Dockerfile +++ b/bitnami/postgresql-repmgr/13/debian-12/Dockerfile @@ -7,11 +7,11 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2024-07-29T17:01:10Z" \ + org.opencontainers.image.created="2024-08-01T12:13:40Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr/README.md" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="13.15.0-debian-12-r16" \ + org.opencontainers.image.ref.name="13.15.0-debian-12-r17" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr" \ org.opencontainers.image.title="postgresql-repmgr" \ org.opencontainers.image.vendor="Broadcom, Inc." \ diff --git a/bitnami/postgresql-repmgr/13/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh b/bitnami/postgresql-repmgr/13/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh index 3ef34ad4b141..e5d602cfbd46 100644 --- a/bitnami/postgresql-repmgr/13/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh +++ b/bitnami/postgresql-repmgr/13/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh @@ -237,8 +237,12 @@ repmgr_get_primary_node() { primary_port="$REPMGR_PRIMARY_PORT" fi else - primary_host="$upstream_host" - primary_port="$upstream_port" + if [[ "${upstream_host}:${upstream_port}" = "${REPMGR_NODE_NETWORK_NAME}:${REPMGR_PORT_NUMBER}" ]]; then + info "Avoid setting itself as primary. Starting PostgreSQL normally..." + else + primary_host="$upstream_host" + primary_port="$upstream_port" + fi fi fi