Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-24 Thread Mark Dilger
; "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 wrote: > I am running this code on Windows 2003.  It > appears that postgres has in src

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-24 Thread Magnus Hagander
On Thu, May 24, 2012 at 2:42 AM, Mark Dilger 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

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-24 Thread Magnus Hagander
On Thu, May 24, 2012 at 12:47 AM, Mark Dilger 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. > Look

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Mark Dilger
GENERAL] FATAL: lock file "postmaster.pid" already exists Mark Dilger 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 > Fi

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Tom Lane
Mark Dilger 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 seem

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Mark Dilger
/desktop/aa365740%28v=vs.85%29.aspx From: Tom Lane To: Mark Dilger Cc: deepak ; Alban Hertroys ; "pgsql-general@postgresql.org" Sent: Wednesday, May 23, 2012 1:54 PM Subject: Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Tom Lane
Mark Dilger writes: > We only use one database, not counting the > built-in template databases.  The server is > running 9.1.3.  We were running 9.1.1 until > fairly recently. OK. I had forgotten that in recent versions, RemovePgTempFiles doesn't only iterate through the pgsql_tmp directories; i

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Mark Dilger
. From: Tom Lane To: Mark Dilger Cc: deepak ; Alban Hertroys ; "pgsql-general@postgresql.org" Sent: Wednesday, May 23, 2012 12:23 PM Subject: Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists Mark Dilger writes: > We do not use tablespac

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Tom Lane
Mark Dilger writes: > We do not use tablespaces at all. [ scratches head... ] If you aren't using any tablespaces, there should be only *one* pgsql_tmp directory, which makes this even more confusing. (Unless you're using a pre-8.3 release, in which case there would be one per database, so mayb

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Mark Dilger
neral@postgresql.org" Sent: Wednesday, May 23, 2012 11:17 AM Subject: Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists Mark Dilger writes: > Prior to posting to the mailing list, we made some > changes in postmaster.c to identify where time was > being spent.  Based

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Tom Lane
Mark Dilger writes: > Prior to posting to the mailing list, we made some > changes in postmaster.c to identify where time was > being spent.  Based on the elog(NOTICE,...) lines > we put in the file, we determined the time was spent > inside RemovePgTempFiles. > I then altered RemovePgTempFiles t

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Mark Dilger
9:50 AM Subject: Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists Mark Dilger writes: > I tried moving the call to RemovePgTempFiles until > after the PID file is fully written, but it did not help. I wonder whether you correctly identified the source of the slowness.

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Mark Dilger
; "pgsql-general@postgresql.org" Sent: Wednesday, May 23, 2012 9:50 AM Subject: Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists Mark Dilger writes: > I tried moving the call to RemovePgTempFiles until > after the PID file is fully written, but it did n

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Tom Lane
Mark Dilger writes: > I tried moving the call to RemovePgTempFiles until > after the PID file is fully written, but it did not help. I wonder whether you correctly identified the source of the slowness. The thing I would have suspected is identify_system_timezone(), which will attempt to read eve

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread Mark Dilger
From: deepak To: Tom Lane Cc: Alban Hertroys ; pgsql-general@postgresql.org; markdil...@yahoo.com Sent: Wednesday, May 23, 2012 9:03 AM Subject: Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists Thanks, I have put one of the other develope

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-23 Thread deepak
Thanks, I have put one of the other developers working on this issue, to comment. -- Deepak On Mon, May 21, 2012 at 10:55 PM, Tom Lane wrote: > deepak writes: > > We could reproduce the start-up problem on Windows 2003. After a reboot, > > postmaster, in its start-up sequence cleans up old tem

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-21 Thread Tom Lane
deepak writes: > We could reproduce the start-up problem on Windows 2003. After a reboot, > postmaster, in its start-up sequence cleans up old temporary files, and > this step used to take several minutes (a little over 4 minutes), delaying > the writing of line 6 onwards into the PID file. This d

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-16 Thread deepak
Hi! We could reproduce the start-up problem on Windows 2003. After a reboot, postmaster, in its start-up sequence cleans up old temporary files, and this step used to take several minutes (a little over 4 minutes), delaying the writing of line 6 onwards into the PID file. This delay caused pg_ctl

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-08 Thread deepak
On Tue, May 8, 2012 at 3:09 AM, Alban Hertroys wrote: > 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

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-08 Thread Alban Hertroys
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 t

[GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-07 Thread deepak
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 f