Automatically starting postmaster after system crash

From: Allan Engelhardt <allane(at)cybaea(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Automatically starting postmaster after system crash
Date: 2001-10-17 09:10:51
Message-ID: 3BCD4B1B.2080907@cybaea.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Giles Constant 2001-10-17 12:28:03 Mirroring with WAL?
Previous Message Allan Engelhardt 2001-10-17 07:31:59 Re: pg_restore blues