Re: pg crashing - Mailing list pgsql-general

From Tom Lane
Subject Re: pg crashing
Date
Msg-id 19416.1214944418@sss.pgh.pa.us
Whole thread Raw
In response to pg crashing  ("Roberts, Jon" <Jon.Roberts@asurion.com>)
Responses Re: pg crashing
Re: pg crashing
List pgsql-general
"Roberts, Jon" <Jon.Roberts@asurion.com> 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.

> Problem: My database keeps on crashing every few days with this type of
> error message:

> 2008-07-01 10:46:30 CDT LOG:  all server processes terminated;
> reinitializing

I think your real problem is with what happened *before* that.
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.  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.

            regards, tom lane

pgsql-general by date:

Previous
From: "Roberts, Jon"
Date:
Subject: pg crashing
Next
From: "Chandra Barnett"
Date:
Subject: Problem with roles and permissions