Re: PG 8.4 won't start on Windows Server 2008 64-bit - Mailing list pgsql-general

From Craig Ringer
Subject Re: PG 8.4 won't start on Windows Server 2008 64-bit
Date
Msg-id 4C58FBA4.9030702@postnewspapers.com.au
Whole thread Raw
In response to Re: PG 8.4 won't start on Windows Server 2008 64-bit  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PG 8.4 won't start on Windows Server 2008 64-bit
List pgsql-general
On 04/08/10 13:22, Tom Lane wrote:
> Craig Ringer <craig@postnewspapers.com.au> writes:
>> On 03/08/10 23:37, David R Robison wrote:
>>> 2010-08-03 15:34:01 GMT LOCATION:  PostmasterMain,
>>> .\src\backend\postmaster\postmaster.c:743
>>> 2010-08-03 15:34:01 GMT DEBUG:  00000: TZ "US/Eastern" matches Windows
>>> timezone "Eastern Daylight Time"
>>> 2010-08-03 15:34:01 GMT LOCATION:  identify_system_timezone,
>>> .\src\timezone\pgtz.c:1088
>>> 2010-08-03 11:34:01 EDT DEBUG:  00000: invoking
>>> IpcMemoryCreate(size=37044224)
>>> 2010-08-03 11:34:01 EDT LOCATION:  CreateSharedMemoryAndSemaphores,
>>> .\src\backend\storage\ipc\ipci.c:130
>>> 2010-08-03 11:34:01 EDT DEBUG:  00000: max_safe_fds = 987, usable_fds =
>>> 1000, already_open = 3
>>> 2010-08-03 11:34:01 EDT LOCATION:  set_max_safe_fds,
>>> .\src\backend\storage\file\fd.c:479
>>> 2010-08-03 11:34:02 EDT DEBUG:  00000: logger shutting down
>>> 2010-08-03 11:34:02 EDT LOCATION:  SysLoggerMain,
>>> .\src\backend\postmaster\syslogger.c:446
>
>> This is pretty odd. It seems to init shared memory OK, set up the fd
>> limits, then exit.
>
> Actually, the logger is launched after those two steps, so the fact that
> we see anything at all from the logger is interesting.  What it looks
> like to me is that the postmaster crashed at some point after launching
> syslogger.  There is (not supposed to be) any exit path that wouldn't
> have logged a complaint message, ergo it was a crash not intentional
> exit.  But just where it crashed is hard to tell from this.

On Windows, there should've been an error from the runtime, like "This
application has requested the Runtime to terminate it in an unusual way" ...

I'm uncertain if such an error would get logged to the postgresql logs
if the *postmaster* crashes, though. I've seen such crashes reported in
Pg logs before, but they may have been from crashing backends rather
than the postmaster its self.

One would expect to see something in the pg logs or the service manager
/ event log history though...

If the postmaster is crashing in startup, a different approach will be
required to debug it. This article may be helpful in explaining how to
set things up if the OP wants to try their hand at hooking up a debugger.

  http://www.debuginfo.com/articles/debugstartup.html

The discussion of using Visual Studio's JIT debugger probably won't help
though, as Visual Studio Express (the free version) doesn't, AFAIK,
include the JIT debugger. You'd have to use windbg from Debugging Tools
for Windows (ugh). And anyway, the postgres account isn't privelged
enough to launch the JIT debugger.

--
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Question about Idle in TX
Next
From: Greg Smith
Date:
Subject: Re: problem with pg_standby