X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C9425476558 for ; Thu, 8 May 2003 13:16:21 -0400 (EDT) Received: from out006.verizon.net (out006pub.verizon.net [206.46.170.106]) by postgresql.org (Postfix) with ESMTP id 15AC44763BD for ; Thu, 8 May 2003 13:16:21 -0400 (EDT) Received: from RavChaim ([162.84.129.6]) by out006.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030508171620.EYMF25800.out006.verizon.net@RavChaim> for ; Thu, 8 May 2003 12:16:20 -0500 Content-Type: text/plain; charset="us-ascii" From: mlaks To: pgsql-admin@postgresql.org Subject: Postgresql goes down need to restart (redhat postgresql service script) lock files removal avoid 2 postmasters Date: Thu, 8 May 2003 12:50:49 -0400 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200305081250.49994.mlaks@bellatlantic.net> X-Authentication-Info: Submitted using SMTP AUTH at out006.verizon.net from [162.84.129.6] at Thu, 8 May 2003 12:16:20 -0500 X-Spam-Status: No, hits=-11.7 required=5.0 tests=BAYES_10,RCVD_IN_OSIRUSOFT_COM,USER_AGENT_KMAIL 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/93 X-Sequence-Number: 8655 Hi,=20 Thank you Tom. I have been looking at the postgresql service startup scripts in Redhat=20 written by Lamar Owen et al. I would like to understand what is the role of the following files that are= =20 created during startup of Postgresql on my Redhat Linux box. 1. /var/lib/pgsql/data/postmaster.pid 2. /var/run/postmaster.pid (for redhat 7.3/Postgresql 7.2)=20 /var/run/postmaster5432.pid (for redhat 9.0/Postgresql 7.3.2) 3. /var/lock/subsys/postgresql and=20 4. /tmp/.s.PGSQL.5432.lock (and associated link to the directory in that= =20 directory). I notice that the file=20 1. /var/lib/pgsql/data/postmaster.pid contains the pid of the=20 /usr/bin/postmaster process. Interestingly Lamar does not rm this file on= =20 stop(). 2. /var/run/postmaster.pid contains the pid of a postgres stats process 3. the /tmp/.s.PGSQL.5432.lock file has the pid of the /usr/bin/postmaster= =20 process. Why do I care? My goal is to use DJ Bernsteins daemonstools to make sure that my Postgre= sql=20 process goes back up unattended if it goes down for some reason. So I will = be=20 substituting daemontools for the postgresql service script. Thus I want to know what lock files to remove to make sure all is ok. I als= o=20 want to follow Tom Lanes's advice and not shoot myself in the foot by=20 creating two different postmaster processes working the same database!!!! Thank you all for your help!!! Mitchell Laks