Re: Funky template1 problem?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Jerry LeVan <jerry(dot)levan(at)eku(dot)edu>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Funky template1 problem?
Date: 2005-12-22 07:18:09
Message-ID: 43AA5331.70004@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jerry LeVan wrote:
> Hi,
>
> I have a bunch of small dbs (levan, pictures, and a couple of others).
>
> I have had these db's over many upgrades and I have just noticed that
> template1 seems to be a bit munged...
[snip]
> I found this out when I tried to create a new user
> testuser for testing a totally none privileged user.
> When I recreate the testuser db using template1
> I found the tables from the picture db were in
> the newly created db.

Yep - that's a feature. It applies to functions etc. too.

> Is it safe to simple drop the db's from the template1
> db? ( I have no idea of how the tables became part
> of template1.)

Deleting the tables is fine. You should be able to drop the template1
database altogether and recreate it using template0 as it's template.
That's why there's two of them, for exactly this circumstance. Have a
look in the mailing-list archives for details.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-12-22 07:20:58 Re: view or index to optimize performance
Previous Message Tom Lane 2005-12-22 04:34:35 Re: two shared memory segments?