Re: How to wait until startup completes

From: Gary Horton <Gary(dot)Horton(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to wait until startup completes
Date: 2005-06-01 16:44:10
Message-ID: 429DE5DA.3050607@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

>Gary Horton <Gary(dot)Horton(at)Sun(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Eckermann 2005-06-01 16:46:49 Re: For Tom Lane
Previous Message Bruno Wolff III 2005-06-01 16:33:02 Re: prevent user change password?