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

From Tom Lane
Subject Re: windows shared memory error
Date
Msg-id 15265.1241277250@sss.pgh.pa.us
Whole thread Raw
In response to Re: windows shared memory error  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Maybe we need to look at all the places we call GetLastError(). There 
> are quite a few of them.

It would only be an issue with syscalls that have badly designed APIs
like this one.  Most of the time you know that the function has failed
and is supposed to have set the error code.

What I'm wondering about right now is whether the sleep-and-retry
logic is needed at all, if we get the error code handling straight.
A look in the archives says that Magnus added it between these two
versions of his draft patch:
http://archives.postgresql.org//pgsql-patches/2007-03/msg00250.php
http://archives.postgresql.org//pgsql-patches/2007-03/msg00263.php
without any indication of why, except that I had complained that
some error checks seemed to be missing in the original.  I wonder
if it was a misguided attempt to fix a stale-error-code problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: windows shared memory error
Next
From: Tom Lane
Date:
Subject: "could not reattach to shared memory" captured in buildfarm