Re: Simpler dump?

From: Ted Byers <r(dot)ted(dot)byers(at)rogers(dot)com>
To: Ted Byers <r(dot)ted(dot)byers(at)rogers(dot)com>, Richard Huxton <dev(at)archonet(dot)com>, Tino Wildenhain <tino(at)wildenhain(dot)de>
Cc: Ted Byers <r(dot)ted(dot)byers(at)rogers(dot)com>, "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Simpler dump?
Date: 2007-12-10 16:09:02
Message-ID: 880831.92797.qm@web88303.mail.re4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

OK, Now I am a bit confused. The manual doesn't say
what to do if you don't see template1 or template0 on
the server, or even whether or not you should be able
to see them when using a tool like pgAdmin. But it
does say:

"The postgres database is also created when a database
cluster is initialized. This database
is meant as a default database for users and
applications to connect to. It is simply a copy of
template1 and may be dropped and recreated if
required."

Now, when I look at postgres, it is empty, apart from
one public schema, and all the items (aggregates &c.)
have nothing in them. The manual talks about creating
a template from an existing database, but not about
how to create a template from a template, apart from
:"template1 is the default source database name for
CREATE DATABASE. For example, one could
drop template1 and recreate it from template0 without
any ill effects."

Obviously, template1 must have been either blown away
by the creation of template_postgis, or the one has
been made to be an alias for the other, or the default
template has been set to use template_postgis. And if
postgres is a copy of template0, and template1 starts
as a copy of template0, and all my databases have
included the postgis stuff, then template_postgis is
the template being used by default.

So, how do I determine whether or not template1 really
exists on my server and is a copy of template0 (as I'd
infer from what I see in postgres) rather than
template_postgis, and then modify things so that the
default is the normal template1 rather than
template_postgis, but leaving the latter in place so I
can use it when I need it?

Thanks

Ted

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-12-10 16:11:37 Re: Planner not using UNIQUEness of index properly
Previous Message Richard Huxton 2007-12-10 15:57:42 Re: Simpler dump?