Re: BUG #1459: Connection hangs when other connection is not committed

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: BUG #1459: Connection hangs when other connection is not committed
Дата
Msg-id 200502041054.16723.peter_e@gmx.net
обсуждение исходный текст
Ответ на BUG #1459: Connection hangs when other connection is not committed  ("Rainer Frey" <rainer.frey@inxmail.de>)
Ответы Re: BUG #1459: Connection hangs when other connection is not  (Rainer Frey <rainer.frey@inxmail.de>)
Список pgsql-bugs
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/

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: BUG #1440: ecpg seg faults
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #1459: Connection hangs when other connection is not committed