Re: LOCK DATABASE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LOCK DATABASE
Дата
Msg-id 23651.1305827429@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: LOCK DATABASE  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Tom Lane's message of jue may 19 13:34:13 -0400 2011:
>> I can't see getting rid of that lock, since we'd simply have to invent
>> some other interlock for new connections vs. DROP DATABASE.  However,
>> I do think that we might sometime need to convert it to a session lock
>> that's held for the life of the backend.  If this feature can't cope
>> with that, that'd be a potential problem.

> The following things acquire a lock on database:

>  ALTER DATABASE SET
>  ALTER DATABASE OWNER
>  COMMENT ON DATABASE

> So as far as features that would cause a problem if we ever decide to
> take a lock on database for the duration of the whole session, this
> isn't the first one.  We'd have to invent a fix for those other things
> anyway.

Only if all the locks involved are exclusive ... which is not what
I was suggesting, and not what they are now IIRC.
        regards, tom lane


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Patch by request at pgcon
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Patch by request at pgcon