pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: mlaks <mlaks@bellatlantic.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Multiple Postmasters - Automatic Shutdown -Tom Lane
Date: Fri, 9 May 2003 10:15:36 -0500
Message-ID: <20030509151536.GA10878@wolff.to> (raw)
In-Reply-To: <200305090947.26864.mlaks@bellatlantic.net>
References: <200305090947.26864.mlaks@bellatlantic.net>

On Fri, May 09, 2003 at 09:47:26 -0400,
  mlaks <mlaks@bellatlantic.net> wrote:
> 
> I copied the clause  
> 
> pid = $(pidof -s /usr/bin/postmaster)
> if [ pid]
> 	then echo $" Postmaster is already running."
> else 
> 
> from Lamar Owen's postgresql service script on RedHat linux. 
> (Q. why does he put echo  $" Postmaster is already running " instead of just 
> echo "Postmaster is already running" ?)

I am not sure what the $ does there.

> I need your expert opinion. I am a complete ignoramous about this. In your 
> wide experience,
> In this very restricted circumstance, even though I am violating Tom's rule of 
> running the 
> rm -f /var/lib/pgsql/data/postmaster.pid beyond boot time, will I possibly 
> start 2 postmasters at once?
> Am I shooting myself in the foot?

Doing this at boot time before running svscan is reasonable. You know
postmaster shouldn't be running at that point. This is also a case when
you are likely to get a spurious conflict as the process id given to
postmaster in the last reboot is likely to be low and if there is some
varience in the boot process some other process might get it this time
and prevent postmaster from coming up.
I wouldn't remove the lockfile in the run file as that isn't likely to
benefit you and might cause serious problems for you.




view thread (2+ messages)

Message-ID: <20030509151536.GA10878@wolff.to>
Permalink:  ../20030509151536.GA10878@wolff.to/
Also on:    postgresql.org/message-id/20030509151536.GA10878@wolff.to

 · 

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: bruno@wolff.to, mlaks@bellatlantic.net
  Subject: Re: Multiple Postmasters - Automatic Shutdown -Tom Lane
  In-Reply-To: <20030509151536.GA10878@wolff.to>
  References: <200305090947.26864.mlaks@bellatlantic.net> <20030509151536.GA10878@wolff.to>

* 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