[BUGS] BUG #7885: postmaster panic on startup does not release shared memory
The following bug has been logged on the website: Bug reference: 7885 Logged by: David Thomas Email address: david.tho...@enterprisedb.com PostgreSQL version: 9.2.3 Operating system: CentOS 6.3 Description: It seems that if the postmaster encounters a PANIC condition during startup, it leaves it's allocated shared memory segments around: -bash-4.1$ ipcs -a -- Shared Memory Segments keyshmid owner perms bytes nattch status -- Semaphore Arrays keysemid owner perms nsems -- Message Queues keymsqid owner perms used-bytes messages -bash-4.1$ /usr/pgsql-9.2/bin/postmaster --single -D /var/lib/pgsql/9.2/data/ test PANIC: could not locate a valid checkpoint record Aborted -bash-4.1$ ipcs -a -- Shared Memory Segments keyshmid owner perms bytes nattch status 0x0001 753664 postgres 60041279488 0 -- Semaphore Arrays keysemid owner perms nsems 0x0001 5439490postgres 60017 0x0002 5472259postgres 60017 0x0003 5505028postgres 60017 0x0004 5537797postgres 60017 0x0005 5570566postgres 60017 0x0006 5603335postgres 60017 0x0007 5636104postgres 60017 -- Message Queues keymsqid owner perms used-bytes messages Considering that it was able to allocate this memory before the panic occurred, it should remove them before exiting. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #7885: postmaster panic on startup does not release shared memory
On Fri, Feb 15, 2013 at 05:02:46PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > When we panic, we PANIC, meaning we don't jump around looking for > > cleanup stuff, which might make things worse. > > I think also there was some thought that we should intentionally leave > the shmem segment around for debugging purposes. > > In any case, I believe the behavior complained of here is specific to > --single mode, which is surely not a production scenario, thus even > less reason to be concerned about it. (If a postmaster child panics, > the postmaster will still shut down normally and thus release the > shmem segment.) > Yup, if I attempt to start the cluster normally, it cleans up after itself, so this is specific to --single mode. -- David Thomas System Engineer EnterpriseDB - The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs