Am Donnerstag, 3. Februar 2005 16:11 schrieb Rainer Frey:
> A select should not lock a table even when it is not committed.

The SELECT obtains a read (shared) lock on the table, but the ALTER TABLE 
requires a write (exclusive) lock.  This is certainly necessary because you 
don't want the structure of the table to be changed while you are reading it.  
Additionally, the locking protocol requires that all locks once obtained need 
to be held until the end of the transaction.  Both of these issues together 
explain the problem you are seeing.  There is nothing that can be done about 
it.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to