pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Neff <jneff@tethyshealth.com>
To: pgsql-jdbc@postgresql.org
Subject: exclusive locking on SELECT ?
Date: Thu, 11 Jan 2007 16:47:43 -0500
Message-ID: <45A6B07F.3050902@tethyshealth.com> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <45A6B07F.3050902@tethyshealth.com>
Permalink:  ../45A6B07F.3050902@tethyshealth.com/
Also on:    postgresql.org/message-id/45A6B07F.3050902@tethyshealth.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: jneff@tethyshealth.com
  Subject: Re: exclusive locking on SELECT ?
  In-Reply-To: <45A6B07F.3050902@tethyshealth.com>
  References: <45A6B07F.3050902@tethyshealth.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