Unset NOTIFY_SOCKET when running the temporary server. (#1325)
* Unset NOTIFY_SOCKET when running the temporary server. Postgres has native support for this notification socket and will write a `READY=1` message once it is ready and accepting connections. Unfortunately, the temporary server used by the `docker-entrypoint.sh` also sends a message on the socket, making it appear as though the container is ready and serving connections when it is not.
This commit is contained in:
parent
729d22b104
commit
cc254e85ed
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ docker_temp_server_start() {
|
|||
# does not listen on external TCP/IP and waits until start finishes
|
||||
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
|
||||
|
||||
# unset NOTIFY_SOCKET so the temporary server doesn't prematurely notify
|
||||
# any process supervisor.
|
||||
NOTIFY_SOCKET= \
|
||||
PGUSER="${PGUSER:-$POSTGRES_USER}" \
|
||||
pg_ctl -D "$PGDATA" \
|
||||
-o "$(printf '%q ' "$@")" \
|
||||
|
|
|
|||
Loading…
Reference in New Issue