Skip site navigation (1) Skip section navigation (2)

Re: Automatically starting postmaster after system crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Allan Engelhardt <allane(at)cybaea(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Automatically starting postmaster after system crash
Date: 2001-10-18 17:42:08
Message-ID: 24636.1003426928@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Allan Engelhardt <allane(at)cybaea(dot)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

In response to

pgsql-admin by date

Next:From: Dmitry MorozovskyDate: 2001-10-18 17:49:09
Subject: Re: update in rule
Previous:From: Brett SchwarzDate: 2001-10-18 16:31:49
Subject: Re: Please help - tks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group