From: Alvaro Herrera <alvherre@dcc.uchile.cl>
To: Scott Marlowe <smarlowe@g2switchworks.com>
Cc: Eduardo Mambrilla Martínez <emambr@tid.es>
Cc: pgsql-admin@postgresql.org
Subject: Re: How can I recreate the template0 database?
Date: Mon, 14 Mar 2005 16:03:36 -0400
Message-ID: <20050314200335.GD32097@dcc.uchile.cl> (raw)
In-Reply-To: <1110815954.28555.37.camel@state.g2switchworks.com>
References: <KCELIDEDMHGGKPDPECPCOEPKCPAA.emambr@tid.es>
<1110815954.28555.37.camel@state.g2switchworks.com>
On Mon, Mar 14, 2005 at 09:59:14AM -0600, Scott Marlowe wrote:
> On Wed, 2005-03-09 at 01:32, Eduardo Mambrilla Martínez wrote:
> > I made a mistake, I droped the template0 database...
> > How can I recreate it?
>
> Do you still have template1? If so, connect in single user mode, enter:
> postgres template1
> create database template0 with template template1
> update pg_database set datallowconn = false where datname='template0';
I think it'd be wise to issue a VACUUM FULL; VACUUM FREEZE in the newly
created template0 before disallowing connections to it.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"El número de instalaciones de UNIX se ha elevado a 10,
y se espera que este número aumente" (UPM, 1972)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: alvherre@dcc.uchile.cl, smarlowe@g2switchworks.com, emambr@tid.es
Subject: Re: How can I recreate the template0 database?
In-Reply-To: <20050314200335.GD32097@dcc.uchile.cl>
References: <KCELIDEDMHGGKPDPECPCOEPKCPAA.emambr@tid.es> <1110815954.28555.37.camel@state.g2switchworks.com> <20050314200335.GD32097@dcc.uchile.cl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox