Re: DROP DATABASE always seeing database in use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: DROP DATABASE always seeing database in use
Дата
Msg-id 5684.1217866191@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: DROP DATABASE always seeing database in use  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Ответы Re: DROP DATABASE always seeing database in use  (Jens-Wolfhard Schicke <drahflow@gmx.de>)
Список pgsql-hackers
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> Tom Lane wrote:
>> I've been bit by that too, and so have other people.  Maybe it'd be
>> worth the trouble to improve the message so that it explicitly tells you
>> when there are prepared transactions blocking the DROP.

> Yes, that should be easy enough.

I looked at this quickly and decided that we can do it with some small
changes to CheckOtherDBBackends().  I propose counting the number of
conflicting PGPROCs and adding a DETAIL line to the existing error
message:

ERROR: database "%s" is being accessed by other users
DETAIL: There are %d session(s) and %d prepared transaction(s) using the database.

I'm aware that this phrasing might not translate very nicely ... anyone
have a suggestion for better wording?
        regards, tom lane


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

Предыдущее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: DROP DATABASE always seeing database in use
Следующее
От: "David Blewett"
Дата:
Сообщение: PL/PythonU