X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0B233475EE2 for ; Thu, 8 May 2003 14:39:24 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by postgresql.org (Postfix) with SMTP id 9897A4765D7 for ; Thu, 8 May 2003 14:39:19 -0400 (EDT) Received: (qmail 3755 invoked by uid 500); 8 May 2003 18:40:33 -0000 Date: Thu, 8 May 2003 13:40:33 -0500 From: Bruno Wolff III To: mlaks Cc: pgsql-admin@postgresql.org Subject: Re: Postgresql goes down need to restart (redhat postgresql service script) lock files removal avoid 2 postmasters Message-ID: <20030508184033.GA3731@wolff.to> Mail-Followup-To: mlaks , pgsql-admin@postgresql.org References: <200305081250.49994.mlaks@bellatlantic.net> <20030508175021.GA3335@wolff.to> <200305081410.52791.mlaks@bellatlantic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200305081410.52791.mlaks@bellatlantic.net> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-34.8 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/97 X-Sequence-Number: 8659 On Thu, May 08, 2003 at 14:10:52 -0400, mlaks wrote: > Thank you for your response Bruno. I agree about the importance of using the > lines > > #!/bin/sh > exec 2>&1 > exec setuidgid postgres /usr/local/pgsql/bin/postmaster -D > /usr/local/pgsql/data > > in the run file. However, what else must we put in as well? > > My question is to understand the lock files for postgresql so I can deal with > the following: Some of the lock files have to do with the init system. Those can be ignored. Postgres also keeps a lock file and that is used to prevent two postmasters from running at the same time. You probably don't want to have a script remove that lock file, because if there really is another postmaster running, starting a second one can be a disaster.