pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: 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 09:59:14 -0600
Message-ID: <1110815954.28555.37.camel@state.g2switchworks.com> (raw)
In-Reply-To: <KCELIDEDMHGGKPDPECPCOEPKCPAA.emambr@tid.es>
References: <KCELIDEDMHGGKPDPECPCOEPKCPAA.emambr@tid.es>

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';

Use CTRL-D to exit.



view thread (3+ messages)  latest in thread

Message-ID: <1110815954.28555.37.camel@state.g2switchworks.com>
Permalink:  ../1110815954.28555.37.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1110815954.28555.37.camel@state.g2switchworks.com

 · 

reply

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: smarlowe@g2switchworks.com, emambr@tid.es
  Subject: Re: How can I recreate the template0 database?
  In-Reply-To: <1110815954.28555.37.camel@state.g2switchworks.com>
  References: <KCELIDEDMHGGKPDPECPCOEPKCPAA.emambr@tid.es> <1110815954.28555.37.camel@state.g2switchworks.com>

* 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