Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Re: org.postgre...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 1948 of 2010
Post > Topic >>

Re: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend

by laurenz.albe@[EMAIL PROTECTED] ("Albe Laurenz *EXTERN*") May 7, 2008 at 01:25 PM

Albretch Mueller wrote:
> adduser [...]

Why you create an operating system user is beyond me, but that
doesn't matter.

You start the database server as user "postgres", and you don't have
to be a specific OS user to use the client.
Maybe you are confusing database users and OS users.

However, that's not im****tant for the problem at hand.

>  But then when I try my java code I get exactly the same error and
> this is what gets logged
> ~
> LOG:  database system was shut down at 2008-05-06 23:51:37 EDT
> LOG:  autovacuum launcher started
> LOG:  database system is ready to accept connections
> LOG:  connection received: host=3D[local]
> LOG:  connection authorized: user=3Dpgtest database=3Dtestdb
> LOG:  statement: select current_timestamp;
> LOG:  statement: select * from testtbl;
> LOG:  connection received: host=3D127.0.0.1 ****t=3D35036
> LOG:  connection authorized: user=3Dpgtest database=3Dtestdb
> LOG:  execute <unnamed>: SELECT
>
n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attle=
n,a.attnum,def.adsrc,dsc.description,t.typbasetype, t.typtype
>  FROM pg_catalog.pg_namespace n  JOIN pg_catalog.pg_class c ON
> (c.relnamespace =3D n.oid)  JOIN pg_catalog.pg_attribute a ON
> (a.attrelid=3Dc.oid)  JOIN pg_catalog.pg_type t ON (a.atttypid =3D
t.oid)
> LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=3Ddef.adrelid AND
> a.attnum =3D def.adnum)  LEFT JOIN pg_catalog.pg_description dsc ON
> (c.oid=3Ddsc.objoid AND a.attnum =3D dsc.objsubid)  LEFT JOIN
> pg_catalog.pg_class dc ON (dc.oid=3Ddsc.classoid AND
> dc.relname=3D'pg_class')  LEFT JOIN pg_catalog.pg_namespace dn ON
> (dc.relnamespace=3Ddn.oid AND dn.nspname=3D'pg_catalog')  WHERE a.attnum
>
> 0 AND NOT a.attisdropped  AND c.relname LIKE 'testtbl'  ORDER BY
> nspname,relname,attnum
> LOG:  disconnection: session time: 0:00:00.289 user=3Dpgtest
> database=3Dtestdb host=3D127.0.0.1 ****t=3D35036

I think the case is clear.

You close the database connection before you issue your statement!

Two things speak in favor of that:
- There is a disconnection message in your log.
- I can reproduce the error message by close()ing the connection before
  execute()ing a statement.

That one statement that gets logged retrieves details about the table
definition of "testtbl".
Is it your JDBC code that issues that statement? If not, what is it?
Is there additional software involved?

Examine the code for a Connection.close() that takes place before the
Statement.execute().

Yours,
Laurenz Albe

--=20
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
 




 5 Posts in Topic:
org.postgresql.util.PSQLException: An I/O error occured while se
lbrtchx@[EMAIL PROTECTED]  2008-05-06 22:16:58 
Re: org.postgresql.util.PSQLException: An I/O error occured whil
lbrtchx@[EMAIL PROTECTED]  2008-05-06 22:33:35 
Re: org.postgresql.util.PSQLException: An I/O error occured whil
laurenz.albe@[EMAIL PROTE  2008-05-07 08:59:05 
Re: org.postgresql.util.PSQLException: An I/O error occured whil
lbrtchx@[EMAIL PROTECTED]  2008-05-07 05:54:35 
Re: org.postgresql.util.PSQLException: An I/O error occured whil
laurenz.albe@[EMAIL PROTE  2008-05-07 13:25:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Aug 21 18:12:28 CDT 2008.