Re: locking a table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: locking a table
Дата
Msg-id 7203.1040671907@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: locking a table  (Andreas Schmitz <a.schmitz@cityweb.de>)
Список pgsql-admin
Andreas Schmitz <a.schmitz@cityweb.de> writes:
> Maybe I have a different idea of exclusive.

Locks are held till the end of the current transaction ... so you need
something like

    begin;
    lock ...;
    do whatever ...;
    commit;

to do anything useful with an explicit lock.  A standalone LOCK command
will drop the lock as soon as it's acquired.

            regards, tom lane

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

Предыдущее
От: Radoslaw Stachowiak
Дата:
Сообщение: Re: SSL Mode
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SSL Mode