Re: BUG #13803: too many clients exception - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #13803: too many clients exception
Date
Msg-id CACjxUsMJfDTV-+6WA6qn35=cUMszzPaU5-5-nYn0SWT-389yBg@mail.gmail.com
Whole thread Raw
In response to BUG #13803: too many clients exception  (sebastian.sierra@netbeam.com.co)
List pgsql-bugs
On Mon, Dec 7, 2015 at 9:29 AM,  <sebastian.sierra@netbeam.com.co> wrote:

> PostgreSQL version: 9.4.0

There are bugs in 9.4.0 which can cause it to run with no apparent
problem for a long time, then suddenly lose data and leave a
corrupted, and possibly unusable database.  It is irresponsible not
to apply the latest bug fixes by applying the latest 9.4 minor
release.

http://www.postgresql.org/support/versioning/

>                                 ps2.close();
>                                 rs2.close();*/

You really haven't given enough information to be sure what your
problem is (for example, how you are measuring this delay), but it
might be the statement close before the result set close.  That
results in the JDBC driver canceling the pending query on the
connection by making a separate connection and signaling the first
to cancel what it is running.  To avoid race conditions which might
cancel some subsequent statement on the first connection, it has to
wait for this all to complete.

Always close the ResultSet object before closing the Statement
object which generated the ResultSet.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #13798: Unexpected multiple exection of user defined function with out parameters
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #13799: Unexpected multiple exection of user defined function with out parameters