Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id B8DA69FA244 for ; Tue, 14 Aug 2007 19:02:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 24240-05 for ; Tue, 14 Aug 2007 19:02:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 6ECDD9FA0A9 for ; Tue, 14 Aug 2007 19:01:55 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id D9BBF564BB; Tue, 14 Aug 2007 17:01:53 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 14 Aug 2007 17:01:51 -0500 Date: Tue, 14 Aug 2007 17:01:51 -0500 From: Decibel! To: Medi Montaseri Cc: pgsql-admin@postgresql.org Subject: Re: postmaster restart on a different dataDir Message-ID: <20070814220151.GU54135@nasby.net> References: <8078a1730708131605pd700c76u2bc9e4c96cac5947@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CEUtFxTsmBsHRLs3" Content-Disposition: inline In-Reply-To: <8078a1730708131605pd700c76u2bc9e4c96cac5947@mail.gmail.com> X-Operating-System: FreeBSD 6.1-RELEASE-p10 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.13 (2006-08-11) X-Hashcash: 1:20:070814:montaseri@gmail.com::NW+BPsBF9gQRzcnV:000000000000000000 00000000000000000000000036sV X-Hashcash: 1:20:070814:pgsql-admin@postgresql.org::dYj8WWjt5azbbPCX:00000000000 0000000000000000000000008/nf X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/167 X-Sequence-Number: 26498 --CEUtFxTsmBsHRLs3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 13, 2007 at 04:05:37PM -0700, Medi Montaseri wrote: > Hi, >=20 > I am trying to measure startup time of postmaster. Say I have postmaster Why? > running on -D /tmp/d1 and would like to restart it on -D /tmp/d2. >=20 > If I just say > time pg_ctl restart -D /tmp/d2 > it will not produce an accurate result because pg_ctl will start postmast= er > 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 ) >=20 > If I call postmaster, then the command is blocking waiting for postmaster= to > exit. So let it stop, start the timer, then start it again. --=20 Decibel!, aka Jim Nasby decibel@decibel.org EnterpriseDB http://enterprisedb.com 512.569.9461 (cell) --CEUtFxTsmBsHRLs3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGwiZPdO30qud8SkgRAkoZAJ9TKwAoXzrOTKu/T8q5saNmchRBUwCgum5E mWBNPBcGWt4XfdSRqfndZv4= =QgHD -----END PGP SIGNATURE----- --CEUtFxTsmBsHRLs3--