Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DC8749FB279 for ; Thu, 11 Jan 2007 17:47:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 43287-08 for ; Thu, 11 Jan 2007 17:47:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lvs00-fl-n03.ftl.affinity.com (lvs00-fl-n03.ftl.affinity.com [216.219.253.136]) by postgresql.org (Postfix) with ESMTP id 585A09FA19A for ; Thu, 11 Jan 2007 17:47:23 -0400 (AST) Received: from [151.196.58.209] ([151.196.58.209]:9990 "EHLO [192.168.16.25]") by ams003.ftl.affinity.com with ESMTP id S388711AbXAKVrS (ORCPT ); Thu, 11 Jan 2007 16:47:18 -0500 Message-ID: <45A6B07F.3050902@tethyshealth.com> Date: Thu, 11 Jan 2007 16:47:43 -0500 From: James Neff User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: exclusive locking on SELECT ? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.201 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200701/85 X-Sequence-Number: 16450 Greetings, I have 3 clients trying to do a select on the same table (different rows). pgAdmin III Server Status shows the queries and has as mode "Exclusive Lock" for all three. After a long while (10 minutes maybe?) things eventually get unstuck and everything is alright. These clients are selecting 2000 rows from the database. My suspicion is the database servers IO is a bottleneck (running SATA drives, not SCSI). Would fetching less number of rows at a time be better? How can I find out what the best number of rows to fetch at a time are? Is this a deadlock situation? How would I go about diagnosing this situation, and how do I fix it? I'm just using the postgresql-8.2-504.jdbc2.jar on all three clients. I'm also researching and trying to implement the pooling suggested before (trying DBCP first). If that will fix this problem then just disregard this. Thanks in advance, James