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 12:17:54
Message-ID: 20051228121744.GC24400@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 28, 2005 at 01:03:16PM +0100, Grzegorz Ta?czyk wrote:
> Hello,
>
> Here is what I see in log file:
>
> WARNING: terminating connection because of crash of another server process

<snip>

> FATAL: the database system is starting up
> (and the last line repeats on each connection generated by website
> backend).
>
> I'm almost sure that it is caused by httpd, but it is not the main
> problem ATM.

It's not directly involved.

> My question is about the last line. Does those connections slow down
> database startup process? Now it looks like that they do, because
> when I shutdown backend then database starts immediatel, but I'm not
> sure, so I would like to hear clear answer :-)

The problem is that after an unclean shutdown the database server has
to go through the transaction logs to recover the database. This can
take time and during that time new connections are rejected. I don't
think attempting to connect slows anything down materially.

> Second question: what is the fastest way to detect database start up process using JDBC?

Try to connect and check the error message if it fails?

I think you're missing the point though. The backend should not be
crashing. Unfortunatly you didn't show the actual log of when the
backend crashed so we can only speculate. Look for something like
"exited with error code" or "signal". Do you have any C backend
functions you defined yourself?

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-12-28 12:38:21 Re: WAL logs multiplexing?
Previous Message Dmitry Panov 2005-12-28 12:17:40 WAL logs multiplexing?