Re: dropdb lock

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: dropdb lock
Дата
Msg-id 21408.1132426667@sss.pgh.pa.us
обсуждение исходный текст
Ответ на dropdb lock  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> In dbcommands.c::dropdb() there are these lines:

>     /* Close pg_database, but keep exclusive lock till commit */
>     heap_close(pgdbrel, NoLock);

> However, ISTM that if I return early from that function because the db 
> doesn't exist I should release the lock immediately. Or is there 
> something I have missed?

Should be OK to drop the lock if you didn't change anything.  OTOH, it
probably doesn't matter much since we don't allow dropdb inside a
transaction block; commit is going to happen shortly anyhow.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: dropdb lock
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Materialized views (Was Re: Improving count(*))