Re: Database server crash ! URGENT !

From: "Sunit Bhatia" <sunit_bhatia(at)hotmail(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Database server crash ! URGENT !
Date: 2001-11-16 10:53:58
Message-ID: F37HyW2lSYgCSrlrCv3000087d2@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message speedboy 2001-11-16 11:35:59 Re: Database server crash ! URGENT !
Previous Message Hans-Jürgen Schönig 2001-11-16 09:30:15 Triggers and Inheritance