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

From Magnus Hagander
Subject Re: windows shared memory error
Date
Msg-id 49FEA39E.70801@hagander.net
Whole thread Raw
In response to Re: windows shared memory error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: windows shared memory error
List pgsql-hackers
Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.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.

//Magnus



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: cleaning up stray references
Next
From: Laurent Laborde
Date:
Subject: high shared buffer and swap