Re: How to wait until startup completes

Поиск
Список
Период
Сортировка
От Gary Horton
Тема Re: How to wait until startup completes
Дата
Msg-id 429DE5DA.3050607@sun.com
обсуждение исходный текст
Ответ на Re: How to wait until startup completes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: How to wait until startup completes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
Gary Horton <Gary.Horton@Sun.COM> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Jeff Eckermann"
Дата:
Сообщение: Re: For Tom Lane
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Old problem needs solution