Re: Table lock while adding a column and clients are logged in

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Table lock while adding a column and clients are logged in
Дата
Msg-id 75790F19-11CF-4158-8176-606740B98539@solfertje.student.utwente.nl
обсуждение исходный текст
Ответ на Table lock while adding a column and clients are logged in  ("Sven Haag" <sven-haag@gmx.de>)
Ответы Re: Table lock while adding a column and clients are logged in
Список pgsql-general
On 2 Apr 2011, at 11:09, Sven Haag wrote:

> hello pg fans,
>
> we have an application that communicates via ODBC directly to the postgres database.
>
> if i'm trying to add an additional column to a table in pgadmin while clients are logged in, pgadmin hangs. only if
allcients are logged out it returns to the normal state. according to our consultant of the application this behavior
doesn'tappear in oracle or sql-server. 
>
> how can i avoid this?


That most likely means that at least one session is keeping a lock on at least one row at the start of your session,
preventingPostgres to modify that row to alter the table definition. 

Oracle and SQL server don't "suffer" from this because they do not handle DDL statements transactionally (I could be
mistakenabout SQL server, I don't know it all that well). 

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,4d983c51651341771511162!



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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Table lock while adding a column and clients are logged in
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: Table lock while adding a column and clients are logged in