Re: Multiple Postmasters - Automatic Shutdown -Tom Lane

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: mlaks <mlaks(at)bellatlantic(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Multiple Postmasters - Automatic Shutdown -Tom Lane
Date: 2003-05-09 15:15:36
Message-ID: 20030509151536.GA10878@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, May 09, 2003 at 09:47:26 -0400,
mlaks <mlaks(at)bellatlantic(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Erick Dennis 2003-05-09 17:02:06 Re: Upgrade to RH9.....Help....PostgreSQL newbie
Previous Message Raymond Chan 2003-05-09 14:40:07 Re: Upgrade to RH9.....Help....PostgreSQL newbie