pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
When is postmaster ready?
3+ messages / 3 participants
[nested] [flat]

* When is postmaster ready?
@ 2003-04-12 21:57 Matt Mello <alien@spaceship.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Matt Mello @ 2003-04-12 21:57 UTC (permalink / raw)
  To: pgsql-admin

I have a startup script that first starts up postmaster, then starts up my
application server.  I haven't run into any problems yet, but just to be
sure, I thought I'd ask:

Once your script comes back from running postmaster, is pg completely ready
to receive connections (IP), or is there some unknown amount of time that
will pass before it will be ready?  The postmater docs didn't seem to
indicate that once you run it, it is absolutely ready for connections.

Thanks!

-- 
Matt Mello




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: When is postmaster ready?
@ 2003-04-13 01:15 Michiel Lange <michiel@minas.demon.nl>
  2003-04-14 14:14 ` Re: When is postmaster ready? Robert Treat <xzilla@users.sourceforge.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Michiel Lange @ 2003-04-13 01:15 UTC (permalink / raw)
  To: alien@spaceship.com; +Cc: pgsql-admin

 From my experience, the time that it takes before it is ready is less than 
a second, so I think you can safely assume the system is ready directly 
after the script tells the postmaster is ready... (otherwise the script 
would be lying to you...)

At 16:57 12-4-2003 -0500, Matt Mello wrote:
>I have a startup script that first starts up postmaster, then starts up my
>application server.  I haven't run into any problems yet, but just to be
>sure, I thought I'd ask:
>
>Once your script comes back from running postmaster, is pg completely ready
>to receive connections (IP), or is there some unknown amount of time that
>will pass before it will be ready?  The postmater docs didn't seem to
>indicate that once you run it, it is absolutely ready for connections.
>
>Thanks!
>
>--
>Matt Mello
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: When is postmaster ready?
  2003-04-13 01:15 Re: When is postmaster ready? Michiel Lange <michiel@minas.demon.nl>
@ 2003-04-14 14:14 ` Robert Treat <xzilla@users.sourceforge.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Robert Treat @ 2003-04-14 14:14 UTC (permalink / raw)
  To: Michiel Lange <michiel@minas.demon.nl>; +Cc: alien@spaceship.com; pgsql-admin

There is actually a delay between when postmaster starts and it is ready
to accept connections.  If you try to connect too soon you'll get the
"database system is starting up" message. IIRC in one particular script
we settled on waiting 5 seconds before trying to connect, which seemed
to be enough time elapsing for us (1 second wasn't in some stress
testing type cases).  If you want to do it the way its done in some of
the postgresql scripts, you need to grep the output of a psql connection
for success; check out pg_ctl for a good example of this.

Robert Treat 

On Sat, 2003-04-12 at 21:15, Michiel Lange wrote:
>  From my experience, the time that it takes before it is ready is less than 
> a second, so I think you can safely assume the system is ready directly 
> after the script tells the postmaster is ready... (otherwise the script 
> would be lying to you...)
> 
> At 16:57 12-4-2003 -0500, Matt Mello wrote:
> >I have a startup script that first starts up postmaster, then starts up my
> >application server.  I haven't run into any problems yet, but just to be
> >sure, I thought I'd ask:
> >
> >Once your script comes back from running postmaster, is pg completely ready
> >to receive connections (IP), or is there some unknown amount of time that
> >will pass before it will be ready?  The postmater docs didn't seem to
> >indicate that once you run it, it is absolutely ready for connections.
> >
> >Thanks!
> >
> >--
> >Matt Mello
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-04-14 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-12 21:57 When is postmaster ready? Matt Mello <alien@spaceship.com>
2003-04-13 01:15 Re: When is postmaster ready? Michiel Lange <michiel@minas.demon.nl>
2003-04-14 14:14 ` Robert Treat <xzilla@users.sourceforge.net>

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