Re: detecting a dead db not seeming to work - Mailing list pgsql-general

From Tom Lane
Subject Re: detecting a dead db not seeming to work
Date
Msg-id 17640.1093532279@sss.pgh.pa.us
Whole thread Raw
In response to detecting a dead db not seeming to work  (Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk>)
Responses Re: detecting a dead db not seeming to work  (Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk>)
List pgsql-general
Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk> writes:
> However one of the tests I performed was to kill -9 the postmaster
> process to see how it would handle that (assuming the same behaviour).
> However nothing happens!  no segfault, no db connection failure etc.

That's the intended behavior on postmaster crash.  It doesn't (and
shouldn't) affect existing backends.

> If I kill my daemon which is trying to talk to it, postgres starts
> without problem agian!
> it's as though my daemon trying to talk to it is keeping the connection
> open and preventing the db from being started!

A new postmaster can't start until the last old backend is gone.  This
is a necessary interlock to avoid data corruption.

            regards, tom lane

pgsql-general by date:

Previous
From: "Leonardo Francalanci"
Date:
Subject: space taken by a row & compressed data
Next
From: Graeme Hinchliffe
Date:
Subject: Re: detecting a dead db not seeming to work