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

Re: How to shoot yourself in the foot: kill -9 postmaster

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to shoot yourself in the foot: kill -9 postmaster
Date: 2001-03-06 02:14:16
Message-ID: 200103060214.VAA19141@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
>    if [ "$notset" = "1" ] ; then
>       if ps h $pid>/dev/null 2>&1; then
>          # TERM first, then KILL if not dead
>          kill -TERM $pid
>          usleep 100000
>          if ps h $pid >/dev/null 2>&1 ; then
>             sleep 1
>             if ps h $pid >/dev/null 2>&1 ; then
>                sleep 3
>                if ps h $pid >/dev/null 2>&1 ; then
>                   kill -KILL $pid
>                fi
>             fi
>          fi
>       fi

Yes, this seems like the proper way to do it.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-hackers by date

Next:From: Hiroshi InoueDate: 2001-03-06 02:14:32
Subject: Re: How to handle waitingForLock in LockWaitCancel()
Previous:From: Lamar OwenDate: 2001-03-06 02:11:38
Subject: Re: How to shoot yourself in the foot: kill -9 postmaster

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group