We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b66069b + 38f839a commit 03584caCopy full SHA for 03584ca
1 file changed
rootfs/bin/is_running
@@ -3,5 +3,9 @@
3
# fail fast
4
set -e
5
6
-# check if database is running
+if [[ -f "$PGDATA/recovery.conf" ]]; then
7
+ # postgres is in recovery mode, so we know it's not ready to accept incoming connections.
8
+ exit 1
9
+fi
10
+
11
gosu postgres pg_ctl status
0 commit comments