Re: FATAL: lock file "postmaster.pid" already exists

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: FATAL: lock file "postmaster.pid" already exists
Дата
Msg-id 59DDC134-5CD1-463B-8C50-EECA90C9EA39@gmail.com
обсуждение исходный текст
Ответ на FATAL: lock file "postmaster.pid" already exists  (deepak <deepak.pn@gmail.com>)
Ответы Re: FATAL: lock file "postmaster.pid" already exists  (deepak <deepak.pn@gmail.com>)
Список pgsql-general
On 8 May 2012, at 24:34, deepak wrote:

> Hi,
>
> On Windows 2008, sometimes the server fails to start due to an existing "postmaster.pid' file.
>
> I tried rebooting a few times and even force shutting down the server, and it started up fine.
> It seems to be a race-condition of sorts in the code that detects whether the process with PID
> in the file is running or not.

No, it means that postgres wasn't shut down properly when Windows shut down. Removing the pid-file is one of the last
thingsthe shut-down procedure does. The file is used to prevent 2 instances of the same server running on the same
data-directory.

If it's a race-condition, it's probably one in Microsoft's shutdown code. I've seen similar problems with Outlook
mailboxeson a network directory; Windows unmounts the remote file-systems before Outlook finished updating its files
underthat mount point, so Outlook throws an error message and Windows doesn't shut down because of that. 

I don't suppose that pid-file is on a remote file-system?

> Does any one have this same problem?  Any way to fix it besides removing the PID file
> manually each time the server complains about this?


You could probably script removal of the pid file if its creation date is before the time the system started booting
up.

Alban Hertroys

--
The scale of a problem often equals the size of an ego.



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

Предыдущее
От: Clemens Eisserer
Дата:
Сообщение: Re: Is there a tool for checking database integrity
Следующее
От: Chrishelring
Дата:
Сообщение: lowercase on columnname using view