Re: shared memory after server kill

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: shared memory after server kill
Дата
Msg-id 18019.1091715425@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: shared memory after server kill  (Oliver Fromme <olli@lurza.secnetix.de>)
Список pgsql-novice
Oliver Fromme <olli@lurza.secnetix.de> writes:
> When you kill the postmaster process forcibly, it doesn't
> release the shared memory segments that it had allocated.

> Use the "ipcs" command to list all currently allocated
> shared memory segments, and use "ipcrm" to remove them.

For some benighted reason, OS X doesn't provide either of those commands
(last I looked anyway).  AFAIK the only way to get rid of an unreleased
shmem segment in OS X is to reboot; there is no manual access to the
shared memory status.

Combine this problem with the fact that OS X's default limit on shmem
size is very small (not enough to allow two reasonable-sized shmem
segments), and you end up with the conclusion that kill -9'ing the
postmaster is an even worse idea on OS X than it is on other systems.
Next time use "kill -QUIT" if you want an emergency postmaster shutdown.
Or try "pg_ctl stop -m fast".

(But I think the real beginner mistake was to try to solve a problem by
killing the postmaster, rather than whichever child process was wedged.
The postmaster process is almost never the direct source of a user-visible
problem.)

            regards, tom lane

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

Предыдущее
От: Oliver Fromme
Дата:
Сообщение: Re: shared memory after server kill
Следующее
От: David Norris
Дата:
Сообщение: Re: UNICODE and regex character classes