Search Postgresql Archives

Re: How to wait until startup completes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
Gary Horton <Gary.Horton@xxxxxxx> writes:
  
[ assorted startup problems ]
    

You did not say what platform this is on, nor which Postgres version
you are running.  Tsk tsk.
  
Actually I did mention 7.3.4 Postgres but obviously I didn't do it clearly. I really did mean to mention that OS is Solaris 8 and 9...
As for the setpgrp business, that doesn't sound real unreasonable.
I use nohup for that purpose, and it seems to work fine on all the
platforms I use, but perhaps on yours setpgrp is the best incantation.
  
Right, nohup deals with SIGHUP but you need setpgrp to deal with SIGINT from controlling tty...
(Of course, for ordinary production work you should be launching the
postmaster from an init script and not from a manual command at all...)
  
Agreed, but we also want to support our users doing admin on our product, which may involve bouncing database server.
The -w-doesn't-wait-long-enough bit needs investigation.  There are
known failure modes for -w, like setting up your access permissions
so that pg_ctl can't log in, but AFAIK that results in waiting till
timeout not in falling through immediately.  Are any messages produced
when you do this?  If you don't see anything, try running the script
with -x to see what it's doing exactly.
No messages, no smoking gun. If you mean running the sh script with -x, it's really not complicated enough to warrant that - I've added echo statements to confirm that it's just falling through. But let's be sure we're saying the same thing: I would expect pg_ctl -w to /block/ until database is started, in other words by the time the pg_ctl command "returns", then checking database status with psql -l should succeed...are we on the same page?

Thanks for your time, Tom -
-Gary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux