pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Allan Engelhardt <allane@cybaea.com>
To: pgsql-admin@postgresql.org
Subject: Automatically starting postmaster after system crash
Date: Wed, 17 Oct 2001 10:10:51 +0100
Message-ID: <3BCD4B1B.2080907@cybaea.com> (raw)

Sorry if this is a FAQ, but I couldn't find it.

If my (RH 7.1) system crashes PostgreSQL does not restart automatically 
because the shared memory segment identifier and the .pid file remains, 
as a manual start explains:

  % pg_ctl start
  pg_ctl: Another postmaster may be running.  Trying to start postmaster 
anyway.
  Found a pre-existing shared memory block (ID 693600256) still in use.
  If you're sure there are no old backends still running,
  remove the shared memory block with ipcrm(1), or just
  delete "/var/lib/pgsql/data/postmaster.pid".
  pg_ctl: cannot start postmaster
  Examine the log output.

What is the "proper" way of ensuring (as far as possible) that 
PostgreSQL starts automatically after a crash?  Is it sufficient (and 
safe) to include a 'rm -f $PGDATA/postmaster.pid' in the system boot 
scripts?

Allan.




view thread (4+ messages)  latest in thread

Message-ID: <3BCD4B1B.2080907@cybaea.com>
Permalink:  ../3BCD4B1B.2080907@cybaea.com/
Also on:    postgresql.org/message-id/3BCD4B1B.2080907@cybaea.com

 · 

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: allane@cybaea.com
  Subject: Re: Automatically starting postmaster after system crash
  In-Reply-To: <3BCD4B1B.2080907@cybaea.com>
  References: <3BCD4B1B.2080907@cybaea.com>

* 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