Skip site navigation (1) Skip section navigation (2)

Re: Service startup delay

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Barry Lind <blind(at)xythos(dot)com>
Cc: pgsql-hackers-win32(at)postgresql(dot)org, Max Dunn <mdunn(at)xythos(dot)com>
Subject: Re: Service startup delay
Date: 2004-08-20 18:00:10
Message-ID: 200408201800.i7KI0Ar08637@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers-win32
Barry Lind wrote:
> We are incorporating the win32 port into our product, and have run into
> a problem with the timing of the startup of the windows service.   What
> is happening is that we have setup a dependency between our service and
> the postgres service so that our service starts after the postgres one.
> However this sometimes still fails, as it appears the postgres service
> returns control to windows before the database is actually fully started
> and ready to accept connections as we are getting an error in our app
> (org.postgresql.util.PSQLException: A connection error has occurred:
> org.postgresql.util.PSQLException: FATAL: the database system is
> starting up).  Can this be fixed?  We can hack around this in our code,
> but it would be nice (and I am sure others will run into this as well)
> if this was fixed properly in the postgres service itself.

I think you need to use 'pg_ctl -w' to wait for it to start.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers-win32 by date

Next:From: Barry LindDate: 2004-08-20 18:03:10
Subject: postmaster.pid
Previous:From: Barry LindDate: 2004-08-20 16:48:31
Subject: Service startup delay

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group