pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Allan Engelhardt <allane@cybaea.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Automatically starting postmaster after system crash
Date: Thu, 18 Oct 2001 13:42:08 -0400
Message-ID: <24636.1003426928@sss.pgh.pa.us> (raw)
In-Reply-To: <3BCDDBF5.9050204@cybaea.com>
References: <26865.1003330212@sss.pgh.pa.us>
	<3BCDDBF5.9050204@cybaea.com>

Allan Engelhardt <allane@cybaea.com> writes:
> Tom Lane wrote:
>> That's kinda hard to believe; how would a shared memory segment survive
>> a system crash?

> I don't think they can.  Some options:

> (1) PostgreSQL keeps a reference to it somewhere and can get confused...

Indeed, there is a reference to the old segment in the postmaster.pid
file.  At startup, if there's a postmaster.pid file, Postgres checks to
see that the indicated shared memory segment is gone or at least has no
processes attached to it.  (This is a defense against the possibility
that the old postmaster died but there are still backends running in
the database.)  Evidently, that check is mistakenly thinking that there
*is* still a shmem seg with attached processes.  Question is why?

> Seriously: I tried to reproduce using SysRq+S, SysRq+B and couldn't.  I 
> think I have seen enough fsck for one night, so I might give it a rest...

You might try just kill -9'ing the postmaster, rather than physically
rebooting your system.

			regards, tom lane



view thread (4+ messages)

Message-ID: <24636.1003426928@sss.pgh.pa.us>
Permalink:  ../24636.1003426928@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24636.1003426928@sss.pgh.pa.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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, allane@cybaea.com
  Subject: Re: Automatically starting postmaster after system crash
  In-Reply-To: <24636.1003426928@sss.pgh.pa.us>
  References: <26865.1003330212@sss.pgh.pa.us> <3BCDDBF5.9050204@cybaea.com> <24636.1003426928@sss.pgh.pa.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