Re: Database server crash ! URGENT ! - Mailing list pgsql-general

From Sunit Bhatia
Subject Re: Database server crash ! URGENT !
Date
Msg-id F37HyW2lSYgCSrlrCv3000087d2@hotmail.com
Whole thread Raw
In response to Database server crash ! URGENT !  ("Sunit Bhatia" <sunit_bhatia@hotmail.com>)
Responses Re: Database server crash ! URGENT !
List 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 by date:

Previous
From: Antonio Fiol Bonnín
Date:
Subject: Re: spectral datasets in postgresql
Next
From: Risko Peter
Date:
Subject: Re: index on numbers not honoured