Re: Template1 is locked when pgAdminIII is open

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: Template1 is locked when pgAdminIII is open
Дата
Msg-id 41FE6281.7010907@pse-consulting.de
обсуждение исходный текст
Ответ на Re: Template1 is locked when pgAdminIII is open  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane wrote:
> "Dave Page" <dpage@vale-housing.co.uk> writes:
>
>>pgAdmin uses template1 by default as it is the only accessible database
>>that we can be sure will exist. There are 2 solutions to your problem:
>
>
>>1) Change your pgAdmin connection to use a different default database.
>
>
>>2) Select a different database to use as the template when creating a
>>new one.
>
>
> He shouldn't really be getting that error though, as CREATE DATABASE
> only complains if there is another connection *besides your own* to
> the template database.
>
> I think the real answer is something more along the lines of "don't run
> two copies of pgAdmin at once".

Which is still not the whole truth.
pgAdmin may open more connections to the "initial database", e.g. to
show the server status.

So the advice is "don't use the template1 database for pgadmin
connections if you're creating databases frequently"

Regards,
Andreas

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Template1 is locked when pgAdminIII is open
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Template1 is locked when pgAdminIII is open