From: | Mike Mascari <mascarm(at)mascari(dot)com> |
---|---|
To: | "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: how to terminate a process when kill fails |
Date: | 2002-10-30 16:36:40 |
Message-ID: | 3DC00A98.8010405@mascari.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Johnson, Shaunn wrote:
>
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2.
>
> I think I may have asked before, but I never got an answer
> that told me one way or another -
>
> How can I kill processes without kill -9 <pid> and
> ruining the database?
>
> I've tried restarting postgreSQL hoping that it cleans up
> a few things. I've tried to simply kill the processes that
> were running. Nothing happens; nothing dies. I don't see
> much of anything in the messages / log files.
>
> Any suggestions?
Use kill -9. Do a:
killall -9 postgres
killall -9 postmaster
The tip message
'Don't kill -9 the postmaster'
is old and was added when havoc could be caused by an old
postgres backend process. Consider the scenrio:
1. postmaster started
2. postgres started (Session #1)
3. postmaster killed (-9)
4. postmaster restarted
5. postgres started (Session #2)
Now there isn't any synchronization between Sesison #1 and
Session #2 at all, which would lead to data corruption. This
scenario was fixed a long time ago (7.1?). The whole 'Don't kill
-9 the postmaster' comment was actually a tongue-in-cheek remark
by me regarding a parallel discussion of RedHat init scripts.
The corruption possibility has long-since been fixed. Since I've
seen FUD claiming PostgreSQL doesn't have sufficient
crash-recovery because of the tip, I suggest the tip be changed to:
'Feel free to kill -9 the postmaster'
Mike Mascari
mascarm(at)mascari(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Harding | 2002-10-30 17:06:40 | Re: [SQL] unnecessary updates |
Previous Message | Robert Treat | 2002-10-30 16:28:29 | Re: maximum number of triggers on a table? |