Re: Automatic recovery process - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Automatic recovery process
Date
Msg-id 20051228121744.GC24400@svana.org
Whole thread Raw
In response to Automatic recovery process  (Grzegorz Tańczyk <goliatus@polzone.pl>)
Responses Re: Automatic recovery process
List 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@svana.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.

Attachment

pgsql-general by date:

Previous
From: Dmitry Panov
Date:
Subject: WAL logs multiplexing?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: WAL logs multiplexing?