Re: file-locking and postmaster.pid

Поиск
Список
Период
Сортировка
От Andreas Joseph Krogh
Тема Re: file-locking and postmaster.pid
Дата
Msg-id 200605231810.27883.andreak@officenet.no
обсуждение исходный текст
Ответ на Re: file-locking and postmaster.pid  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: file-locking and postmaster.pid  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tuesday 23 May 2006 17:54, Tom Lane wrote:
> Andreas Joseph Krogh <andreak@officenet.no> writes:
> > I've experienced several times that PG has died somehow and the
> > postmaster.pid file still exists 'cause PG hasn't had the ability to
> > delete it upon proper shutdown. Upon start-up, after such an incidence,
> > PG tells me another PG is running and that I either have to shut down the
> > other instance, or delete the postmaster.pid file if there really isn't
> > an instance running. This seems totally unnecessary to me.
>
> The postmaster does check to see whether the PID mentioned in the file
> is still alive, so it's not that easy for the above to happen.  If you
> can provide details of a scenario where a failure is likely, we'd like
> to know about it.  Also, what PG version are you talking about?

I have experienced this with PG-8.1.3 and will provide details if I can make
it happen. Basically it has happened when I have had to "hard-reset" my
laptop due to some strange bugs in Linux which have made it hang.

> > Why doesn't PG use file-locking to tell if another
> > PG is running or not?
>
> Portability.

Ok.

--
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
------------------------+---------------------------------------------+
OfficeNet AS            | The most difficult thing in the world is to |
Hoffsveien 17           | know how to do a thing and to watch         |
PO. Box 425 Skøyen      | somebody else doing it wrong, without       |
0213 Oslo               | comment.                                    |
NORWAY                  |                                             |
Phone : +47 22 13 01 00 |                                             |
Direct: +47 22 13 10 03 |                                             |
Mobile: +47 909  56 963 |                                             |
------------------------+---------------------------------------------+


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Further reduction of bufmgr lock contention
Следующее
От: Marc Munro
Дата:
Сообщение: Re: New feature proposal