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



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to