Re: Template1 is locked when pgAdminIII is open

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "Mehul Doshi-A20614" <mehul(at)motorola(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Template1 is locked when pgAdminIII is open
Date: 2005-01-31 17:29:12
Message-ID: 20711.1107192552@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
> Tom Lane wrote:
>> I think the real answer is something more along the lines of
>> "don't run two copies of pgAdmin at once".

> He might not be. pgAdmin uses a master connection (normally to
> template1) and one connection to each database browsed (minus the master
> connection which is reused). However, each SQL Query window opened will
> also open a new connection to the currently selected database, which is
> what might have happened in this case. Of course, the easy answer is to
> close any SQL windows in template1 as well...

Hmm. Would it be possible to teach pgAdmin to close extra connections
to template1 whenever it's doing CREATE DATABASE?

Of course, sooner or later we should fix the underlying locking
mechanism so we don't have to have this constraint, but I'm not sure
when that will happen.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2005-01-31 17:48:59 Re: Template1 is locked when pgAdminIII is open
Previous Message Tom Lane 2005-01-31 17:16:26 Re: [BUGS] Bug in create operator and/or initdb