| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: windows shared memory error |
| Date: | 2009-05-04 01:41:01 |
| Message-ID: | 49FE47AD.6080005@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
>> 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.
>
>
>
I suspect it has little or nothing to do with it in fact. On my (very
lightly loaded) Vista box a crash with exit code 9 seems to result in a
consistently problem free restart. I did 200 iterations of the test.
Now presumably we sleep for 1 sec between the CloseHandle() call and the
CreateFileMapping() call in that code for a reason. We have seen in
other cases that Windows can take some time after a call has returned
for some operations to actually complete, and I assume we have a similar
case here. So, my question is: how do we know that 1 second is enough?
Was that a wild guess?
I confess I don't have much confidence that just repeating it a few
times without increasing the sleep interval will necessarily solve the
problem.
cheers
andrew
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2009-05-04 01:47:46 | Re: windows shared memory error |
| Previous Message | Tom Lane | 2009-05-04 01:30:20 | Re: unchecked out of memory in postmaster.c |