Re: BUG #13803: too many clients exception

From: Kevin Grittner <kgrittn(at)gmail(dot)com>
To: sebastian(dot)sierra(at)netbeam(dot)com(dot)co
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13803: too many clients exception
Date: 2015-12-08 16:25:21
Message-ID: CACjxUsMJfDTV-+6WA6qn35=cUMszzPaU5-5-nYn0SWT-389yBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Dec 7, 2015 at 9:29 AM, <sebastian(dot)sierra(at)netbeam(dot)com(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2015-12-08 16:40:11 Re: BUG #13799: Unexpected multiple exection of user defined function with out parameters
Previous Message David G. Johnston 2015-12-08 16:24:39 Re: BUG #13798: Unexpected multiple exection of user defined function with out parameters