Tom Lane wrote: > "Roberts, Jon" <Jon.Roberts@xxxxxxxxxxx> writes: >> Version: "PostgreSQL 8.3.0, compiled by Visual C++ build 1400" > > Well, there are plenty of known bugs in 8.3.0 by now. You really > should update before complaining, not after. Yes. And the traditional question should be asked - is there any antivirus or other "personal security" software running on tihs machine? If so, uninstall (not just disable!) it and see if the problem goes away. >> 2008-07-01 10:46:30 CDT LOG: all server processes terminated; >> reinitializing > > I think your real problem is with what happened *before* that. Agreed. There is some reason that they all terminated... > But: >> 2008-07-01 10:46:31 CDT FATAL: pre-existing shared memory block is >> still in use >> 2008-07-01 10:46:31 CDT HINT: Check if there are any old server >> processes still running, and terminate them. > > Hmm ... the code in win32_shmem.c that generates this message seems > mighty bogus to me --- it's just hoping that one-second delay is > enough. Well, we're basically waiting for the kernel cleanup thread to get run. In my tests it never came above 20ms or so, so 1 second is a pretty long time. And you need *some* kind of timeout... It would also be interesting to know if there are actually any other processes running at this time. > Another problem is that postmaster children that do > PGSharedMemoryDetach will still have valid inherited handles for > the shmem segment --- does that factor into the behavior? It looks > to me like the CloseHandle ought to be in PGSharedMemoryDetach. Not as long as the processes die. If they die, their handles go with them, and once the reference count goes to zero, the object goes away. //Magnus