Re: Database server crash ! URGENT !

Поиск
Список
Период
Сортировка
От Sunit Bhatia
Тема Re: Database server crash ! URGENT !
Дата
Msg-id F37HyW2lSYgCSrlrCv3000087d2@hotmail.com
обсуждение исходный текст
Ответ на Database server crash ! URGENT !  ("Sunit Bhatia" <sunit_bhatia@hotmail.com>)
Ответы Re: Database server crash ! URGENT !  (speedboy <speedboy@nomicrosoft.org>)
Список pgsql-general
I investigated it further, and figured out that BOURNE SHELL is a non-job
control shell, whereas C Shell is a Job Control Shell.
So in Bourne shell, even though the process is running as a background job,
its Process Group ID is same as that of the Terminal ID.
So any signal generated by the Terminal is sent to all the child processes,
which have the same Process Group ID.
That's why SIGINT signal generated by Control-C is sent to database server
running in the background and server SHUTS DOWN !!

This is not the case in case of background job running in C Shell.

Now my question is HOW DO I DISSOCIATE MY SERVER PROCESS FROM THE TERMINAL
??

Any Ideas or suggestions ? Please share !

btw, I separated out 'su' and 'postmaster', but this problem is still there,
as explained above.

thanks
Sunit




> > I've narrowed down the problem. Here is what I did:
> > As suggested by everybody, I started the server like this:
>
> > su - pgsql -c "nohup $DB_ROOT/bin/postmaster -B 50 -N 25
>-D$DB_ROOT/data
> > -i" </dev/null >>$LOGFILE 2>&1  </dev/null &
>
>Not sure, but maybe the correct spelling is
>
>su - pgsql -c "nohup $DB_ROOT/bin/postmaster -B 50 -N 25  -D$DB_ROOT/data
>-i </dev/null >>$LOGFILE 2>&1" &
>
>As is, you're redirecting the stdin etc of su, not of the
>eventually-launched shell that execs the postmaster.  I don't know if
>that's the problem, but it seems unlikely to be a good idea.
>
>            regards, tom lane


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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

Предыдущее
От: Antonio Fiol Bonnín
Дата:
Сообщение: Re: spectral datasets in postgresql
Следующее
От: Risko Peter
Дата:
Сообщение: Re: index on numbers not honoured