Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6A0E99FA250 for ; Thu, 11 Jan 2007 19:17:09 -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 54475-09 for ; Thu, 11 Jan 2007 19:17:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id C55279FA222 for ; Thu, 11 Jan 2007 19:17:01 -0400 (AST) Received: (qmail 7397 invoked from network); 11 Jan 2007 23:17:00 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 11 Jan 2007 23:17:00 -0000 In-Reply-To: <45A6B07F.3050902@tethyshealth.com> References: <45A6B07F.3050902@tethyshealth.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: exclusive locking on SELECT ? Date: Thu, 11 Jan 2007 18:17:09 -0500 To: James Neff X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/86 X-Sequence-Number: 16451 On 11-Jan-07, at 4:47 PM, James Neff wrote: > 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. Are you doing select for update ? If so why so many rows ? > > 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? no > > How would I go about diagnosing this situation, and how do I fix it? Have you tuned the server ? > > 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 > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings >