From: | mlaks <mlaks(at)bellatlantic(dot)net> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Postgresql goes down need to restart (redhat postgresql service script) lock files removal avoid 2 postmasters |
Date: | 2003-05-08 16:50:49 |
Message-ID: | 200305081250.49994.mlaks@bellatlantic.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
Thank you Tom.
I have been looking at the postgresql service startup scripts in Redhat
written by Lamar Owen et al.
I would like to understand what is the role of the following files that are
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)
/var/run/postmaster5432.pid (for redhat 9.0/Postgresql 7.3.2)
3. /var/lock/subsys/postgresql
and
4. /tmp/.s.PGSQL.5432.lock (and associated link to the directory in that
directory).
I notice that the file
1. /var/lib/pgsql/data/postmaster.pid contains the pid of the
/usr/bin/postmaster process. Interestingly Lamar does not rm this file on
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
process.
Why do I care?
My goal is to use DJ Bernsteins daemonstools to make sure that my Postgresql
process goes back up unattended if it goes down for some reason. So I will be
substituting daemontools for the postgresql service script.
Thus I want to know what lock files to remove to make sure all is ok. I also
want to follow Tom Lanes's advice and not shoot myself in the foot by
creating two different postmaster processes working the same database!!!!
Thank you all for your help!!!
Mitchell Laks
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-05-08 17:50:21 | Re: Postgresql goes down need to restart (redhat postgresql service script) lock files removal avoid 2 postmasters |
Previous Message | Luis Sousa | 2003-05-08 13:02:46 | unsubscribe |