Re: Can a SELECT block?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gerald Gutierrez" <gutz(at)kalador(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Can a SELECT block?
Date: 2001-03-29 00:20:31
Message-ID: 20736.985825231@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Gerald Gutierrez" <gutz(at)kalador(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Maurizio Ortolan 2001-03-29 04:50:56 Error in the date field (with NULL value...).Thanks!
Previous Message Gerald Gutierrez 2001-03-29 00:10:58 Can a SELECT block?