Re: Automatic recovery process

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Grzegorz Ta?czyk <goliatus(at)polzone(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Automatic recovery process
Date: 2005-12-28 13:29:57
Message-ID: 20051228132955.GH24400@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 28, 2005 at 02:13:14PM +0100, Grzegorz Ta?czyk wrote:
> So why after closing all connections database system starts up
> immediately? This problem also occurs when backend starts up before
> database system and there are connections pending. Always the best
> solution is to restart backend. I use Excalibur Datasource component
> on the backend for connection pooling.

PostgreSQL uses a process per connection. If one of those processes
dies unexpectedly (like your signal 11 below) the database has possibly
been corrupted. So the postmaster closes all other connections and
starts recovery. If you connect during the recovery phase you get
rejected with "database starting up".

I have know idea what how connection pooling component changes anything
as I don't know how it works.

> LOG: server process (PID 22946) was terminated by signal 11
> LOG: terminating any other active server processes

See, this should not happen. You should find out what that process (PID
22946) was doing and why it crashed. Look through the logs to find out
what query it was running. It may be a bug in PostgreSQL, it may be
corrupted data. Anyway, trying to paper over it won't help, you need to
stop the database server crashing. Solve that and everything will work
again.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vilen Tambovtsev 2005-12-28 14:31:24 Re: DB crash after disk full
Previous Message Christopher Browne 2005-12-28 13:28:11 Re: sending mail from Postgres