Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9H9ZMP37077 for ; Wed, 17 Oct 2001 05:35:22 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f9H9C4w04601 for pgsql-admin@postgresql.org; Wed, 17 Oct 2001 05:12:04 -0400 (EDT) (envelope-from news) From: Allan Engelhardt X-Newsgroups: comp.databases.postgresql.admin Subject: Automatically starting postmaster after system crash Date: Wed, 17 Oct 2001 10:10:51 +0100 Organization: http://cybaea.com/ Lines: 23 Message-ID: <3BCD4B1B.2080907@cybaea.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012 X-Accept-Language: en-us To: pgsql-admin@postgresql.org X-Archive-Number: 200110/154 X-Sequence-Number: 2399 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.