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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: FATAL: lock file "postmaster.pid" already exists
Дата
Msg-id 15028.1337815558@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: FATAL: lock file "postmaster.pid" already exists  (Mark Dilger <markdilger@yahoo.com>)
Ответы Re: FATAL: lock file "postmaster.pid" already exists  (Mark Dilger <markdilger@yahoo.com>)
Список pgsql-general
Mark Dilger <markdilger@yahoo.com> writes:
> I am running this code on Windows 2003.� It
> appears that postgres has in src/port/dirent.c
> a port of readdir() that internally uses the
> WIN32_FIND_DATA structure, and the function
> FindNextFile() to iterate through the directory.
> Looking at the documentation, it seems that
> this function does collect file creation time,
> last access time, last write time, file size, etc.,
> much like performing a stat.

> In my case, the code is iterating through roughly
> 56,000 files.  Apparently, this is doing the
> equivalent of a stat on each of them.

That would explain it all right.  I think you're basically screwed here,
because so far as I can see Windows doesn't provide any means to
enumerate a directory's contents without fetching that info; at least
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364232(v=vs.85).aspx
doesn't seem to offer any substitutes for FindFirstFile/FindNextFile.

It's barely possible that using FindFirstFileEx with fInfoLevelId =
FindExInfoBasic would save enough to be useful, except that that option
doesn't exist on Windows 2003 anyway.

Consider using another operating system ...

            regards, tom lane

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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: pg_log is 2 hours ahead ???
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: FATAL: lock file "postmaster.pid" already exists