Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

hard shutdown of system


  • From: "surabhi.ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
  • To: <pgsql-general(at)postgresql(dot)org>
  • Subject: hard shutdown of system
  • Date: Mon, 17 Apr 2006 12:17:21 +0530
  • Message-id: <8626C1B7EB748940BCDD7596134632BE398673(at)jal(dot)iiitb(dot)ac(dot)in>

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


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group