From c23050e23136a5aeaca2f93a0d0bdca66607e348 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 11 Apr 2014 19:21:50 -0400 Subject: [PATCH] Revert "Use PostgreSQL 9.3's `pg_isready` to wait for connectivity" Reverting postgres superuser changes until after stable. This reverts commit e2066841106a6b89093ab685368742efa4e3c2c1. --- nixos/modules/services/databases/postgresql.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index ed66c15e304d..08a9cdd9f5da 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -226,7 +226,7 @@ in # Wait for PostgreSQL to be ready to accept connections. postStart = '' - while ! ${pkgs.postgresql93}/bin/pg_isready > /dev/null; do + while ! su -s ${pkgs.stdenv.shell} postgres -c 'psql postgres -c ""' 2> /dev/null; do if ! kill -0 "$MAINPID"; then exit 1; fi sleep 0.1 done