Search Postgresql Archives

hard shutdown of system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux