Re: detecting a dead db not seeming to work

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

On Thu, 2004-08-26 at 15:57, Tom Lane wrote:
> 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.

indeed, but I need to be able to see that it's dead so I can then try
and reconnect. What is the name of the process that will be holding the
connection open? by kill -9 ing the process I am trying to simulate a
failure case.

> > 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.

But I kill -9 the postmaster, and I cannot start a fresh one, so my
process is sat in limbo, thinking it is talking to a db that isn't there
:).

Well I think so, although I suspect that some part of the db is still
there and running?

--
-----
Graeme Hinchliffe (BSc)
Core Internet Systems Designer
Zen Internet (http://www.zen.co.uk/)

Direct: 0845 058 9074
Main : 0845 058 9000
Fax : 0845 058 9005

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-08-26 14:57:59 Re: detecting a dead db not seeming to work
Previous Message Leonardo Francalanci 2004-08-26 14:55:48 R: space taken by a row & compressed data