Re: FATAL: lock file "postmaster.pid" already exists - Mailing list pgsql-general

From Magnus Hagander
Subject Re: FATAL: lock file "postmaster.pid" already exists
Date
Msg-id CABUevExK+ZkHQtenEPDQgMSAwH4f0JsbAjg4fXEW66=_nvm1CQ@mail.gmail.com
Whole thread Raw
In response to Re: FATAL: lock file "postmaster.pid" already exists  (Mark Dilger <markdilger@yahoo.com>)
List pgsql-general
On Thu, May 24, 2012 at 2:42 AM, Mark Dilger <markdilger@yahoo.com> wrote:
> FindFirstFile can take a wildcard filename
> pattern.  It appears that we are effectively
> calling FindFirstFile without a pattern, getting
> all 56000 file names with complete stat
> information, doing a poor-man's regex on
> those names, and matching just the temporary
> files.
>
> If RemovePgTempFiles were modified to
> pass a filter, this code might perform better
> on Windows.  I'll look into this.

It might in that case be worthwhile looking at using scandir() on
platforms that support that as well, so that other platforms can
benefit from an optimization as well. Though I'm not sure how much
that would actually help - ISTM that one actually scans the whole
directory anyway, just you don't have to do it yourself...

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

pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: FATAL: lock file "postmaster.pid" already exists
Next
From: Pavel Stehule
Date:
Subject: enhanced linestyles for psql