From 48700bc8432dee81e4ed80ea8033f2132637c01c Mon Sep 17 00:00:00 2001 From: James McHugh Date: Wed, 3 Jul 2024 05:06:32 -0400 Subject: [PATCH] [bitnami/postgresql] Updated libpostgresql.sh to specify a host to Postgres Commands (#68236) Updated libpostgresql.sh to specify the loopback address as the host for psql commands Signed-off-by: James Riley McHugh Co-authored-by: James Riley McHugh --- .../16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitnami/postgresql/16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh b/bitnami/postgresql/16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh index 8608fbe269bb..a5da57b04bd5 100644 --- a/bitnami/postgresql/16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh +++ b/bitnami/postgresql/16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh @@ -792,7 +792,7 @@ postgresql_start_bg() { else "${pg_ctl_cmd[@]}" "start" "${pg_ctl_flags[@]}" >/dev/null 2>&1 fi - local pg_isready_args=("-U" "postgres" "-p" "$POSTGRESQL_PORT_NUMBER") + local pg_isready_args=("-U" "postgres" "-p" "$POSTGRESQL_PORT_NUMBER" "-h" "127.0.0.1") local counter=$POSTGRESQL_INIT_MAX_TIMEOUT while ! "$POSTGRESQL_BIN_DIR"/pg_isready "${pg_isready_args[@]}" >/dev/null 2>&1; do sleep 1 @@ -1078,7 +1078,7 @@ postgresql_execute_print_output() { local opts read -r -a opts <<<"${@:4}" - local args=("-U" "$user" "-p" "${POSTGRESQL_PORT_NUMBER:-5432}") + local args=("-U" "$user" "-p" "${POSTGRESQL_PORT_NUMBER:-5432}" "-h" "127.0.0.1") [[ -n "$db" ]] && args+=("-d" "$db") [[ "${#opts[@]}" -gt 0 ]] && args+=("${opts[@]}")