BUG #7885: postmaster panic on startup does not release shared memory

From: david(dot)thomas(at)enterprisedb(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #7885: postmaster panic on startup does not release shared memory
Date: 2013-02-15 18:33:21
Message-ID: E1U6Q65-0007P8-Lp@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 7885
Logged by: David Thomas
Email address: david(dot)thomas(at)enterprisedb(dot)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 --------
key shmid owner perms bytes nattch status

------ Semaphore Arrays --------
key semid owner perms nsems

------ Message Queues --------
key msqid 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 --------
key shmid owner perms bytes nattch status
0x00000001 753664 postgres 600 41279488 0

------ Semaphore Arrays --------
key semid owner perms nsems
0x00000001 5439490 postgres 600 17
0x00000002 5472259 postgres 600 17
0x00000003 5505028 postgres 600 17
0x00000004 5537797 postgres 600 17
0x00000005 5570566 postgres 600 17
0x00000006 5603335 postgres 600 17
0x00000007 5636104 postgres 600 17

------ Message Queues --------
key msqid owner perms used-bytes messages

Considering that it was able to allocate this memory before the panic
occurred, it should remove them before exiting.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Maciek Sakrejda 2013-02-15 18:57:10 Re: BUG #7883: "PANIC: WAL contains references to invalid pages" on replica recovery
Previous Message Martin Pitt 2013-02-15 18:29:59 Re: BUG #7884: pg_upgradecluster is terribly slow