pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: James Neff <jneff@tethyshealth.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: exclusive locking on SELECT ?
Date: Thu, 11 Jan 2007 18:17:09 -0500
Message-ID: <C62C61AE-36EE-422B-8DA9-C36B77598C3A@fastcrypt.com> (raw)
In-Reply-To: <45A6B07F.3050902@tethyshealth.com>
References: <45A6B07F.3050902@tethyshealth.com>


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
>




view thread (4+ messages)  latest in thread

Message-ID: <C62C61AE-36EE-422B-8DA9-C36B77598C3A@fastcrypt.com>
Permalink:  ../C62C61AE-36EE-422B-8DA9-C36B77598C3A@fastcrypt.com/
Also on:    postgresql.org/message-id/C62C61AE-36EE-422B-8DA9-C36B77598C3A@fastcrypt.com

 · 

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: pg@fastcrypt.com, jneff@tethyshealth.com
  Subject: Re: exclusive locking on SELECT ?
  In-Reply-To: <C62C61AE-36EE-422B-8DA9-C36B77598C3A@fastcrypt.com>
  References: <45A6B07F.3050902@tethyshealth.com> <C62C61AE-36EE-422B-8DA9-C36B77598C3A@fastcrypt.com>

* 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