Re: shared memory after server kill

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Fromme <olli(at)lurza(dot)secnetix(dot)de>
Cc: sdavis2(at)mail(dot)nih(dot)gov (Sean Davis), pgsql-novice(at)postgresql(dot)org
Subject: Re: shared memory after server kill
Date: 2004-08-05 14:17:05
Message-ID: 18019.1091715425@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Oliver Fromme <olli(at)lurza(dot)secnetix(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message David Norris 2004-08-05 16:49:52 Re: UNICODE and regex character classes
Previous Message Oliver Fromme 2004-08-05 11:06:09 Re: shared memory after server kill