hard shutdown of system - Mailing list pgsql-general

From surabhi.ahuja
Subject hard shutdown of system
Date
Msg-id 8626C1B7EB748940BCDD7596134632BE398673@jal.iiitb.ac.in
Whole thread Raw
Responses Re: hard shutdown of system  ("chris smith" <dmagick@gmail.com>)
Re: hard shutdown of system  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
the user tries to do kill -9 -1 and log in again
 
in the startup script i do the following
 
/sbin/pidof -s postmaster
 
and it still displays some value,
 
however ps -aef | grep postmaster does not display anything
 
is it ok if i do the following
 pid1=`/sbin/pidof -s postmaster`
 pid2=`ps -eaf | grep postmaster | grep -v grep | tail -1 | awk '{print $2}'`
if ($pid1 and $pid2)
=> postmaster is already running
 
otherwise
 
i check if postmaster.pid exists
if it does, i delete it
and then start postmaster by doing $PGCTL -l $POSTGRES_LOG -D $PGDATA -p $POSTMASTER -o '-p ${PGPORT}' start  > /dev/null 2>&1
 
is it ok?
 
thanks,
regards
Surabhi

pgsql-general by date:

Previous
From: "Thomas F. O'Connell"
Date:
Subject: ERROR: could not access status of transaction
Next
From: "chris smith"
Date:
Subject: Re: hard shutdown of system