pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Till Toenges <tt@kyon.de>
To: Steven Schlansker <steven@likeness.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads
Date: Fri, 10 Feb 2012 06:39:50 +0100
Message-ID: <4F34ADA6.4050008@kyon.de> (raw)
In-Reply-To: <20279E38-EDB7-4D2B-8DD1-A1CF5F3E9F1D@likeness.com>
References: <5CBAD10C-C4DB-4AE3-ADB4-8197E0AA4146@likeness.com>
	<CADK3HHJgR_sDBTvmAmkyEM9RxE9x2QGA1Ukb+mnsooZQd+NULQ@mail.gmail.com>
	<20279E38-EDB7-4D2B-8DD1-A1CF5F3E9F1D@likeness.com>

On 2012-02-10 05:20, Steven Schlansker wrote:
> I'm not sure how locking applies here.  There is no locking code that
> I see in any of the ResultSet classes, nor did I add any, and it's my
> understanding that ResultSet instances themselves are not to be
> shared amongst threads.  So this is not relevant.
>
> Let me know if I've misunderstood, Steven

I don't know about sharing the result set. But the code is thread safe 
as it is. At worst, it would issue a few unneccessary extra requests to 
the server. But since the write to metaData is atomic, and it never gets 
set to null anywhere, eventually every thread would have a valid 
instance, just not neccessarily the same. Unless it is absolutely 
required that every call getMetaData() returns the same instance, that 
will be good enough.


Till

-- 
Kyon, Till Toenges, tt@kyon.de, http://kyon.de
Obergplatz 14, 47804 Krefeld, +49-2151-3620334



view thread (7+ messages)  latest in thread

Message-ID: <4F34ADA6.4050008@kyon.de>
Permalink:  ../4F34ADA6.4050008@kyon.de/
Also on:    postgresql.org/message-id/4F34ADA6.4050008@kyon.de

 · 

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: tt@kyon.de, steven@likeness.com, pg@fastcrypt.com
  Subject: Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads
  In-Reply-To: <4F34ADA6.4050008@kyon.de>
  References: <5CBAD10C-C4DB-4AE3-ADB4-8197E0AA4146@likeness.com> <CADK3HHJgR_sDBTvmAmkyEM9RxE9x2QGA1Ukb+mnsooZQd+NULQ@mail.gmail.com> <20279E38-EDB7-4D2B-8DD1-A1CF5F3E9F1D@likeness.com> <4F34ADA6.4050008@kyon.de>

* 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