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 markdil...@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

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 markdil...@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

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

2012-05-24 Thread Mark Dilger
Lane t...@sss.pgh.pa.us; deepak deepak...@gmail.com; Alban Hertroys haram...@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

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 t...@sss.pgh.pa.us wrote: deepak deepak...@gmail.com writes: We could reproduce the start-up problem on Windows 2003. After a reboot, postmaster, in its

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

2012-05-23 Thread Mark Dilger
From: deepak deepak...@gmail.com To: Tom Lane t...@sss.pgh.pa.us Cc: Alban Hertroys haram...@gmail.com; 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

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

2012-05-23 Thread Tom Lane
Mark Dilger markdil...@yahoo.com 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

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

2012-05-23 Thread Mark Dilger
...@yahoo.com Cc: deepak deepak...@gmail.com; Alban Hertroys haram...@gmail.com; pgsql-general@postgresql.org pgsql-general@postgresql.org Sent: Wednesday, May 23, 2012 9:50 AM Subject: Re: [GENERAL] FATAL: lock file postmaster.pid already exists Mark Dilger markdil...@yahoo.com writes: I tried

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

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

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

2012-05-23 Thread Tom Lane
Mark Dilger markdil...@yahoo.com 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

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

2012-05-23 Thread Mark Dilger
...@gmail.com; Alban Hertroys haram...@gmail.com; pgsql-general@postgresql.org pgsql-general@postgresql.org Sent: Wednesday, May 23, 2012 11:17 AM Subject: Re: [GENERAL] FATAL: lock file postmaster.pid already exists Mark Dilger markdil...@yahoo.com writes: Prior to posting to the mailing list

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

2012-05-23 Thread Tom Lane
Mark Dilger markdil...@yahoo.com 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

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

2012-05-23 Thread Mark Dilger
. From: Tom Lane t...@sss.pgh.pa.us To: Mark Dilger markdil...@yahoo.com Cc: deepak deepak...@gmail.com; Alban Hertroys haram...@gmail.com; pgsql-general@postgresql.org pgsql-general@postgresql.org Sent: Wednesday, May 23, 2012 12:23 PM Subject: Re: [GENERAL] FATAL: lock file

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

2012-05-23 Thread Tom Lane
Mark Dilger markdil...@yahoo.com 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

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

2012-05-23 Thread Mark Dilger
:54 PM Subject: Re: [GENERAL] FATAL: lock file postmaster.pid already exists Mark Dilger markdil...@yahoo.com 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

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

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

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

2012-05-23 Thread Mark Dilger
pgsql-general@postgresql.org Sent: Wednesday, May 23, 2012 4:25 PM Subject: Re: [GENERAL] FATAL: lock file postmaster.pid already exists Mark Dilger markdil...@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

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

2012-05-21 Thread Tom Lane
deepak deepak...@gmail.com 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

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 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 the code

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 haram...@gmail.com 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,

[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