Re: Some Problems - Shall I reinstall the DB?

From: vwu98034(at)lycos(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Some Problems - Shall I reinstall the DB?
Date: 2011-02-01 20:03:20
Message-ID: 25005788.45791296590600215.JavaMail.root@mail-zbox13.bo3.lycos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In regarding of log message, I get the following error message on my application for the connection problem and there is NOT any error messages in the PG log file. It is the same with DbVisualizer - not error messages in the PG log file.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:150)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
... 52 more
Caused by: java.io.EOFException
at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:261)
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:269)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
... 64 more
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When I try to access PG from PC command prompt with the psql command, I get the following error message:

psql: server closed the connection unexpectedly
This probably mean the server terminated abnormally before or while processing the request.

This time a error message shows up in the PG log file: "FATAL: could not reattach to shared memory (key=5432001, addr=011D0000): Invalid argument"

As I can tell, the PG log file doesn't tell the whole story. The version of PG is 8.0.

----- Original Message -----
From: "Adrian Klaver" <adrian(dot)klaver(at)gmail(dot)com>
To: vwu98034(at)lycos(dot)com
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Sent: 2011年1月31日 星期一 下午01时30分09秒 GMT -08:00 US/Canada Pacific
Subject: Re: [GENERAL] Some Problems - Shall I reinstall the DB?

On 01/31/2011 01:18 PM, vwu98034(at)lycos(dot)com wrote:
> The DB connection problem has nothing to do with Hibernate. As I have said that the problem can be solved by restarting the DB.
>This problem occurs with my application as well as DdVisualizer.

So know we know it is a generic connection problem. Is there information
in the Postgres logs that might be helpful?

>
> And as I have mentioned, the id error doesn't occur to other table.

Again is there any information generated in the logs when you try to
connect to that table? Another thing to check is whether the max id in
the table is greater then the last value for the sequence associated
with that table. Could be id(s) got inserted without using the sequence.

>

At this time reinstalling the DB would seem to be excessive. There is no
guarantee that the problem won't just appear again with out knowing what
is in the first place.

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yngve Nysaeter Pettersen 2011-02-01 20:05:25 Re: Select for update with offset interferes with concurrent transactions
Previous Message Radosław Smogura 2011-02-01 19:05:22 Re: Select for update with offset interferes with concurrent transactions