Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 95D3C9F93E4 for ; Mon, 13 Aug 2007 20:05:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 98078-02 for ; Mon, 13 Aug 2007 20:05:35 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by postgresql.org (Postfix) with ESMTP id B19F99F93A1 for ; Mon, 13 Aug 2007 20:05:39 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d32so3157803pye for ; Mon, 13 Aug 2007 16:05:38 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=QK1SIZ7j79h/Qc17vMcPea/lqUdU4cteP3/J7TsWcTBJD/6qD9EUBNlTtVRE1HdZ6sQSFDPWPp0VIW82thuJDj62VzZe3nBm40qa0dqTLyrHLudslM4utFqq5tfYHm5sySAPV4msM86W23vTyW5rn/9d6CapXz23Ts1hYGKD71g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=R3Z7QVvzdXQlBixzF9IKke7OqeUdo5hLHg76Y3nI3EwOIoUItDF1O1yDwUUCXIXskZp91FAd0XjJ2/OYKbjoxpVx/tcc9Es4fZyZS1eIdxuiMvU0XQlYuP3G+qHmAcWIT3KJday3bDluAASkrpyOUSFBSgHRUeRXs633lML4mlI= Received: by 10.65.139.9 with SMTP id r9mr10459664qbn.1187046337245; Mon, 13 Aug 2007 16:05:37 -0700 (PDT) Received: by 10.65.110.15 with HTTP; Mon, 13 Aug 2007 16:05:37 -0700 (PDT) Message-ID: <8078a1730708131605pd700c76u2bc9e4c96cac5947@mail.gmail.com> Date: Mon, 13 Aug 2007 16:05:37 -0700 From: "Medi Montaseri" To: pgsql-admin@postgresql.org Subject: postmaster restart on a different dataDir MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_48889_25317090.1187046337139" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/148 X-Sequence-Number: 26479 ------=_Part_48889_25317090.1187046337139 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I am trying to measure startup time of postmaster. Say I have postmaster running on -D /tmp/d1 and would like to restart it on -D /tmp/d2. If I just say time pg_ctl restart -D /tmp/d2 it will not produce an accurate result because pg_ctl will start postmaster in the background and return immediately but if you query the engine right away, you'll see that it is not ready yet as in time ( pg_ctl restart -D /tmp/d2 ; psql -l ) If I call postmaster, then the command is blocking waiting for postmaster to exit. I am sure there is a way...but I figured I ask my good friends first... Thanks Medi ------=_Part_48889_25317090.1187046337139 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

I am trying to measure startup time of postmaster. Say I have postmaster running on -D /tmp/d1 and would like to restart it on -D /tmp/d2.

If I just say
time pg_ctl restart -D /tmp/d2
it will not produce an accurate result because pg_ctl will start postmaster in the background and return immediately but if you query the engine right away, you'll see that it is not ready yet as in
time ( pg_ctl restart -D /tmp/d2 ; psql -l )

If I call postmaster, then the command is blocking waiting for postmaster to exit.
I am sure there is a way...but I figured I ask my good friends first...

Thanks
Medi
------=_Part_48889_25317090.1187046337139--