pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Decibel! <decibel@decibel.org>
To: Medi Montaseri <montaseri@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: postmaster restart on a different dataDir
Date: Tue, 14 Aug 2007 17:01:51 -0500
Message-ID: <20070814220151.GU54135@nasby.net> (raw)
In-Reply-To: <8078a1730708131605pd700c76u2bc9e4c96cac5947@mail.gmail.com>
References: <8078a1730708131605pd700c76u2bc9e4c96cac5947@mail.gmail.com>

On Mon, Aug 13, 2007 at 04:05:37PM -0700, Medi Montaseri wrote:
> Hi,
> 
> 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.
> 
> 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.

So let it stop, start the timer, then start it again.
-- 
Decibel!, aka Jim Nasby                        decibel@decibel.org
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

view thread (3+ messages)  latest in thread

Message-ID: <20070814220151.GU54135@nasby.net>
Permalink:  ../20070814220151.GU54135@nasby.net/
Also on:    postgresql.org/message-id/20070814220151.GU54135@nasby.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: decibel@decibel.org, montaseri@gmail.com
  Subject: Re: postmaster restart on a different dataDir
  In-Reply-To: <20070814220151.GU54135@nasby.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox