Re: how to terminate a process when kill fails

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: how to terminate a process when kill fails
Дата
Msg-id 3DC00A98.8010405@mascari.com
обсуждение исходный текст
Ответ на how to terminate a process when kill fails  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Ответы Re: how to terminate a process when kill fails
Re: how to terminate a process when kill fails
Список 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@mascari.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: maximum number of triggers on a table?
Следующее
От: "Ian Harding"
Дата:
Сообщение: Re: [SQL] unnecessary updates