Re: Can a SELECT block? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Can a SELECT block?
Date
Msg-id 20736.985825231@sss.pgh.pa.us
Whole thread Raw
In response to Can a SELECT block?  ("Gerald Gutierrez" <gutz@kalador.com>)
List pgsql-sql
"Gerald Gutierrez" <gutz@kalador.com> writes:
> Under what situations can a SELECT block?

If the table is locked with an exclusive lock.  See
http://www.postgresql.org/devel-corner/docs/postgres/locking-tables.html

> 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.

This would be somewhat annoying for VACUUM, which can only clean out
tuples that went away before the oldest open transaction started.
But offhand I think it does not matter for anything else.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Gerald Gutierrez"
Date:
Subject: Can a SELECT block?
Next
From: Patrick Coulombe
Date:
Subject: 3 options