From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: windows shared memory error |
Date: | 2009-05-04 12:37:53 |
Message-ID: | 49FEE1A1.4070903@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Magnus Hagander wrote:
> Tom Lane wrote:
>
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>
>>> Now presumably we sleep for 1 sec between the CloseHandle() call and the
>>> CreateFileMapping() call in that code for a reason.
>>>
>> I'm not sure. Magnus never did answer my question about why the sleep
>> and retry was put in at all; it seems not unlikely from here that it
>> was mere speculation.
>>
>
> It was necessary at the time.
>
> The actual 1 second value was completely random - it fixed all the
> issues on my test VM at the time. I don't recall exactly the details,
> but I do recall having to run a lot of tests before I managed to provoke
> an error, and that with the 1 sec thing i could run it for a day of
> repeated restarts without any errors.
>
>
>
Well, my untested hypothesis is that the actual time required is
variable, depending on environmental factors such as machine load. So
testing repeatedly where such factors are constant might not be good
enough. That's why I suggested some sort of increasing backoff, in an
attempt to be adaptive.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-05-04 12:45:34 | Re: windows shared memory error |
Previous Message | Tom Lane | 2009-05-04 12:37:06 | Re: windows doesn't notice backend death |