pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Multiple Postmasters - Automatic Shutdown -Tom Lane
2+ messages / 2 participants
[nested] [flat]

* Multiple Postmasters - Automatic Shutdown -Tom Lane
@ 2003-05-09 13:47  mlaks <mlaks@bellatlantic.net>
  0 siblings, 1 reply; 2+ messages in thread

From: mlaks @ 2003-05-09 13:47 UTC (permalink / raw)
  To: pgsql-admin

Dear Gurus,



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Multiple Postmasters - Automatic Shutdown -Tom Lane
@ 2003-05-09 15:15  Bruno Wolff III <bruno@wolff.to>
  parent: mlaks <mlaks@bellatlantic.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruno Wolff III @ 2003-05-09 15:15 UTC (permalink / raw)
  To: mlaks <mlaks@bellatlantic.net>; +Cc: 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.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-05-09 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-09 13:47 Multiple Postmasters - Automatic Shutdown -Tom Lane mlaks <mlaks@bellatlantic.net>
2003-05-09 15:15 ` Bruno Wolff III <bruno@wolff.to>

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