Postgresql goes down need to restart (redhat postgresql service script) lock files removal avoid 2 postmasters
От | mlaks |
---|---|
Тема | Postgresql goes down need to restart (redhat postgresql service script) lock files removal avoid 2 postmasters |
Дата | |
Msg-id | 200305081250.49994.mlaks@bellatlantic.net обсуждение исходный текст |
Ответы |
Re: Postgresql goes down need to restart (redhat postgresql service script) lock files removal avoid 2 postmasters
|
Список | 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
В списке pgsql-admin по дате отправления: