Re: windows shared memory error - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: windows shared memory error
Date
Msg-id 49FEA91D.40408@hagander.net
Whole thread Raw
In response to Re: windows shared memory error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> Tom Lane wrote:
>>> It says here:
>>> http://msdn.microsoft.com/en-us/library/ms885627.aspx
> 
>> FWIW, this is the Windows CE documentation. The one for win32 is at:
>> http://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx
> 
> Sorry, that was the one that came up first in a Google search ...

Yeah, it's annoying, but that often happens. One has to be careful to
check though - the wince stuff is usually just a subset of the full
win32, but sometimes there can be subtle differences. So I recommend
always making sure you look at the win32 docs, not wince.


>> The quick try would be to stick a SetLastError(0) in there, just to be
>> sure... Could be worth a try?
> 
> I kinda think we should do that whether or not it can be proven to
> have anything to do with Andrew's report.  It's just like "errno = 0"
> for Unix --- sometimes you have to do it to be sure of whether a
> particular function has thrown an error.

Right.

Ok, I've applied a patch that does this. Given that it's certainly not
in a performance critical path, the overhead shouldn't be noticeable,
and it's certainly not wrong to do it :)

//Magnus



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: "could not reattach to shared memory" captured in buildfarm
Next
From: Magnus Hagander
Date:
Subject: Re: windows doesn't notice backend death