Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 840BF64FD30 for ; Tue, 18 Nov 2008 15:44:50 -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 50490-03 for ; Tue, 18 Nov 2008 15:44:47 -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 99E1F64FC8B for ; Tue, 18 Nov 2008 15:44:47 -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 mAIJiiEi023940; Tue, 18 Nov 2008 14:44:45 -0500 (EST) To: Mischa Sandberg cc: pgsql-admin@postgresql.org Subject: Re: Reliably determining whether the server came up In-reply-to: <1227035210.4923124a948e9@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> <20048.1227023982@sss.pgh.pa.us> <1227026844.4922f19ce4c77@legacywebmail.telus.net> <22317.1227032425@sss.pgh.pa.us> <1227035210.4923124a948e9@legacywebmail.telus.net> Comments: In-reply-to Mischa Sandberg message dated "Tue, 18 Nov 2008 11:06:50 -0800" Date: Tue, 18 Nov 2008 14:44:44 -0500 Message-ID: <23939.1227037484@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/106 X-Sequence-Number: 30760 Mischa Sandberg writes: >> You could sleep for a second or so *before* you start looking for >> the pidfile. > The systems are under erratic load, due to concurrent > cpu and diskio spikes around start-up time. > 1-2 secs is not enough to be a guarantee :-( Well, forget pg_ctl and just start the postmaster directly, so that your script knows its PID. Then you could keep an eye on whether the PID still exists. regards, tom lane