pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: david.thomas@enterprisedb.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7885: postmaster panic on startup does not release shared memory
Date: Fri, 15 Feb 2013 15:42:29 -0500
Message-ID: <20130215204229.GE12030@momjian.us> (raw)
In-Reply-To: <E1U6Q65-0007P8-Lp@wrigleys.postgresql.org>
References: <E1U6Q65-0007P8-Lp@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>


When we panic, we PANIC, meaning we don't jump around looking for
cleanup stuff, which might make things worse.  Postgres should never
panic, so it would be good if you found the cause of the panic.

Does restarting the server remove the old shared memory stuff?

---------------------------------------------------------------------------

On Fri, Feb 15, 2013 at 06:33:21PM +0000, david.thomas@enterprisedb.com wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      7885
> Logged by:          David Thomas
> Email address:      david.thomas@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 --------
> 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.
> 
> 
> 
> -- 
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (4+ messages)  latest in thread

Message-ID: <20130215204229.GE12030@momjian.us>
Permalink:  ../20130215204229.GE12030@momjian.us/
Also on:    postgresql.org/message-id/20130215204229.GE12030@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, david.thomas@enterprisedb.com
  Subject: Re: BUG #7885: postmaster panic on startup does not release shared memory
  In-Reply-To: <20130215204229.GE12030@momjian.us>
  References: <E1U6Q65-0007P8-Lp@wrigleys.postgresql.org> <20130215204229.GE12030@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox