Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4727A64FE07 for ; Tue, 18 Nov 2008 11:59:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96653-08 for ; Tue, 18 Nov 2008 11:59:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1A2F164FD63 for ; Tue, 18 Nov 2008 11:59:43 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mAIFxgNM020049; Tue, 18 Nov 2008 10:59:42 -0500 (EST) To: Mischa Sandberg cc: "H. Hall" , pgsql-admin@postgresql.org Subject: Re: Reliably determining whether the server came up In-reply-to: <1226989027.49225de368848@legacywebmail.telus.net> References: <1226527535.491b532f4c45e@legacywebmail.telus.net> <491F1861.4060403@reedyriver.com> <1226780945.491f3111e22de@legacywebmail.telus.net> <1226781115.22056.1.camel@jd-laptop.pragmaticzealot.org> <49200BD8.4060703@reedyriver.com> <1226989027.49225de368848@legacywebmail.telus.net> Comments: In-reply-to Mischa Sandberg message dated "Mon, 17 Nov 2008 22:17:07 -0800" Date: Tue, 18 Nov 2008 10:59:42 -0500 Message-ID: <20048.1227023982@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/98 X-Sequence-Number: 30752 Mischa Sandberg writes: > Perhaps it's my "test for DB ready" that's the problem? > + while pg_ctl status && ! psql -l; do sleep 1; done >/dev/null 2>&1 I'd bet that the pg_ctl status part is failing. I get exit status 1 from it if there's no server running. regards, tom lane