Re: detecting a dead db not seeming to work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Graeme Hinchliffe <graeme(dot)hinchliffe(at)zeninternet(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: detecting a dead db not seeming to work
Date: 2004-08-26 14:57:59
Message-ID: 17640.1093532279@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Graeme Hinchliffe <graeme(dot)hinchliffe(at)zeninternet(dot)co(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-08-26 15:05:15 Re: space taken by a row & compressed data
Previous Message Graeme Hinchliffe 2004-08-26 14:57:55 Re: detecting a dead db not seeming to work