pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Mikko Tiihonen <mikko.tiihonen@iki.fi>
Cc: pgsql-jdbc <pgsql-jdbc@postgresql.org>
Subject: Re: Fix more unit test connection leaks
Date: Sat, 21 Jul 2007 21:31:54 -0400 (EDT)
Message-ID: <Pine.BSO.4.64.0707212130340.5908@leary.csoft.net> (raw)
In-Reply-To: <1185062569.1632.80.camel@dual.local>
References: <1185062569.1632.80.camel@dual.local>



On Sun, 22 Jul 2007, Mikko Tiihonen wrote:

> I found some more connection leaks from the test cases.
>

Yeah, I started looking at your original patch and figured there would be 
more, so I enabled the code to report the location of any opened but 
unclosed connections (in the attached hack).  Does your latest patch pass 
this test?

Kris Jurka

Attachments:

find-conn-leaks.patch (text/plain, 1.7K) download Index: org/postgresql/test/TestUtil.java =================================================================== RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/test/TestUtil.java,v retrieving revision 1.22 diff -c -r1.22 TestUtil.java *** org/postgresql/test/TestUtil.java 1 Dec 2006 08:53:46 -0000 1.22 --- org/postgresql/test/TestUtil.java 22 Jul 2007 01:29:49 -0000 *************** *** 35,40 **** --- 35,41 ---- + getDatabase() + "?prepareThreshold=" + getPrepareThreshold() + "&loglevel=" + getLogLevel() + + "&logUnclosedConnections=true" + protocolVersion; } Index: org/postgresql/ds/common/BaseDataSource.java =================================================================== RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/ds/common/BaseDataSource.java,v retrieving revision 1.8 diff -c -r1.8 BaseDataSource.java *** org/postgresql/ds/common/BaseDataSource.java 16 Jul 2007 05:16:45 -0000 1.8 --- org/postgresql/ds/common/BaseDataSource.java 22 Jul 2007 01:29:49 -0000 *************** *** 267,273 **** { return "jdbc:postgresql://" + serverName + (portNumber == 0 ? "" : ":" + portNumber) + "/" + databaseName + ! "?loginTimeout=" + loginTimeout + "&prepareThreshold=" + prepareThreshold; } /** --- 267,273 ---- { return "jdbc:postgresql://" + serverName + (portNumber == 0 ? "" : ":" + portNumber) + "/" + databaseName + ! "?loginTimeout=" + loginTimeout + "&prepareThreshold=" + prepareThreshold + "&logUnclosedConnections=true"; } /**

view thread (3+ messages)  latest in thread

Message-ID: <Pine.BSO.4.64.0707212130340.5908@leary.csoft.net>
Permalink:  ../Pine.BSO.4.64.0707212130340.5908@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.64.0707212130340.5908@leary.csoft.net

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, mikko.tiihonen@iki.fi
  Subject: Re: Fix more unit test connection leaks
  In-Reply-To: <Pine.BSO.4.64.0707212130340.5908@leary.csoft.net>
  References: <1185062569.1632.80.camel@dual.local> <Pine.BSO.4.64.0707212130340.5908@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox