Skip site navigation (1) Skip section navigation (2)

Re: Template1 is locked when pgAdminIII is open

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 16:59:54
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E45287CB@ratbert.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgsql-bugs
 

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
> Sent: 31 January 2005 16:40
> To: Dave Page
> Cc: Mehul Doshi-A20614; pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] Template1 is locked when pgAdminIII is open 
> 
> "Dave Page" <dpage(at)vale-housing(dot)co(dot)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".

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...

Regards, Dave.

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-01-31 17:16:26
Subject: Re: [BUGS] Bug in create operator and/or initdb
Previous:From: Andreas PflugDate: 2005-01-31 16:53:21
Subject: Re: Template1 is locked when pgAdminIII is open

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group