Can a SELECT block?

From: "Gerald Gutierrez" <gutz(at)kalador(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Can a SELECT block?
Date: 2001-03-29 00:10:58
Message-ID: IIEOKIIOJMELMIFMMEBFGEGCCAAA.gutz@kalador.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi all.

I'm trying to track down a deadlock problem caused by some automatically
generated SQL code. It seems I'm deadlocking on a table that is actually
quite rarely modified. I'm unsure, but it appears that maybe something is
blocking on a SELECT call.

Under what situations can a SELECT block?

I'm assuming that a simple INSERT probably cannot block anywhere.

Under what situations, aside from two UPDATEs to the same row, can an UPDATE
block?

I'd appreciate any time. To give some details, it appears that my
application server (Orion) is holding connections to the database, some of
which are not in transactions, and some of which are "primed" for
connections (meaning that a BEGIN is always issued, and waits till
transactional work needs to be done, at which point it issues a COMMIT and
then another BEGIN and waits again). It seems to always issue the command
"SET TRANSACTION ISOLATION LEVEL READ COMMITTED" after each BEGIN.

I'd appreciate any help that anyone can give.

Thanks.

Gerald.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-03-29 00:20:31 Re: Can a SELECT block?
Previous Message David Olbersen 2001-03-28 23:38:38 Self-Referencing