Re: exclusive locking on SELECT ?

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: James Neff <jneff(at)tethyshealth(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: exclusive locking on SELECT ?
Date: 2007-01-11 23:17:09
Message-ID: C62C61AE-36EE-422B-8DA9-C36B77598C3A@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


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
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Deval kulshrestha 2007-01-12 06:00:09 Re: Test db connection to 'jdbc:postgresql://grid-master:5432/arco' ... Failed (1)
Previous Message James Neff 2007-01-11 21:47:43 exclusive locking on SELECT ?