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

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: FATAL: lock file "postmaster.pid" already exists
Дата
Msg-id 1337895606.90885.YahooMailNeo@web39306.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: FATAL: lock file "postmaster.pid" already exists  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-general
We have lots of partition tables that inherit
from a smaller number of parents.  Some,
but not all of these tables also have indexes.
The number actually varies depending on
the data loaded.  For some other database
instances, fortunately on Linux, the number
is in the millions.

I have been testing with passing FindFirstFile
a pattern to match the temporary file names,
rather than letting FindFirstFile/FindNextFile
return all names and then having postgres
do the pattern match itself.  So far, this looks
very promising, with a stand-alone program
that uses this technique cutting the runtime
from 4 minutes down to less than a second.

I have a fairly clean patch in the works that
I will submit after I have verified it on
Windows 2003, Windows 2008 and Linux.





From: Magnus Hagander <magnus@hagander.net>
To: Mark Dilger <markdilger@yahoo.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>; deepak <deepak.pn@gmail.com>; Alban Hertroys <haramrae@gmail.com>; "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Sent: Thursday, May 24, 2012 3:58 AM
Subject: Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

On Thu, May 24, 2012 at 12:47 AM, Mark Dilger <markdilger@yahoo.com> wrote:
> 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.

how did you end up with 56,000 files? Lots and lots and lots of tables?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


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

Предыдущее
От: fche@redhat.com (Frank Ch. Eigler)
Дата:
Сообщение: Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: enhanced linestyles for psql