Re: How to tell when postmaster is ready

From: Richard Huxton <dev(at)archonet(dot)com>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to tell when postmaster is ready
Date: 2004-06-10 08:32:44
Message-ID: 40C81CAC.1010506@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas Hallgren wrote:
> I'm writing a small test harness. I have two threads. One that starts
> the postmaster and another that does all the testing and finally stops
> the postmaster with a pg_ctl stop. At present, the second thread starts
> with a sleep sufficient to ensure that the postmaster is running. Is
> there a proper way to test when the postmaster is ready to receive
> commands?

I've always assumed once I can connect, then I can send queries. There's
certainly a "postmaster still starting up" error message I've seen,
which would support that view.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message NMB Webmaster 2004-06-10 09:34:29 Different runtime on the same query
Previous Message James Pharaoh 2004-06-10 08:28:50 Transactions and insertion ordering