Re: Multiple Postmasters - Automatic Shutdown -Tom Lane - Mailing list pgsql-admin

From Bruno Wolff III
Subject Re: Multiple Postmasters - Automatic Shutdown -Tom Lane
Date
Msg-id 20030509151536.GA10878@wolff.to
Whole thread Raw
In response to Multiple Postmasters - Automatic Shutdown -Tom Lane  (mlaks <mlaks@bellatlantic.net>)
List pgsql-admin
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.


pgsql-admin by date:

Previous
From: Raymond Chan
Date:
Subject: Re: Upgrade to RH9.....Help....PostgreSQL newbie
Next
From: Erick Dennis
Date:
Subject: Re: Upgrade to RH9.....Help....PostgreSQL newbie