Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 5D9272D0B0E for ; Fri, 10 Feb 2012 05:09:29 -0400 (AST) Received: from mail63.csoft.net ([205.205.214.4]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RvmTt-0000vz-2v for pgsql-jdbc@postgresql.org; Fri, 10 Feb 2012 09:09:29 +0000 Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id DD8AE2840F; Fri, 10 Feb 2012 04:09:11 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=P7O2M3emhbzrrHmywSSmzbMyJCI=; b=1yJxBp B8N6+s8GiZxVuiFteAKifGCwsRnwcwGNyrK4NB7xLIuaE7ZWUzsrYeKsk3ZsD6N5 j2Wj/Q0L29UfnooyUh5FpH+WmrVrIYxz7uAfdieB5ZnkIizOyr6GlHDhUE4qVyC5 joi+xMzU6rioKVmnKoMYUFO0a32iaFBBndLKs= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id D92E02840E; Fri, 10 Feb 2012 04:09:11 -0500 (EST) Received: by leary.csoft.net (Postfix, from userid 1112) id D4EF2A2B4; Fri, 10 Feb 2012 04:09:11 -0500 (EST) Date: Fri, 10 Feb 2012 04:09:11 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Steven Schlansker cc: Till Toenges , Dave Cramer , pgsql-jdbc@postgresql.org Subject: Re: Patch to fix bug #6293 - regression in driver performance with regards to ResultSetMetaData-heavy workloads In-Reply-To: Message-ID: References: <5CBAD10C-C4DB-4AE3-ADB4-8197E0AA4146@likeness.com> <20279E38-EDB7-4D2B-8DD1-A1CF5F3E9F1D@likeness.com> <4F34ADA6.4050008@kyon.de> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/29 X-Sequence-Number: 22682 On Thu, 9 Feb 2012, Steven Schlansker wrote: > So IMO whether getMetaData() is thread safe or not is irrelevant, as > nothing else in the class is. Making the entire class thread safe would > probably not be worth the effort (sharing a ResultSet between threads > just sounds like a bad idea, and the increased synchronization overhead > would punish everyone who does it "right") I concur that thread safety is not an issue here. I have committed a variant of your fix that moves the caching into AbstractJdbc2ResultSet instead of having each concrete implementation class have its own copy of that code. Kris Jurka