Re: restored over postgres database

From: Bill Moran <wmoran(at)collaborativefusion(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: "Kevin Duffy" <KD(at)wrinvestments(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: restored over postgres database
Date: 2008-12-03 17:00:23
Message-ID: 20081203120023.0f90e7fd.wmoran@collaborativefusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>:

> On Wed, Dec 3, 2008 at 9:38 AM, Kevin Duffy <KD(at)wrinvestments(dot)com> wrote:
> > Hello:
> >
> > On a newly installed PostgreSQL server I made the mistake of restoring over
> > the postgres database.
> >
> > Which I made me feel very silly and brought up a couple of questions.
> >
> > a) What is the postgres database used for?
>
> By default, nothing usually. Whatever you're using it for is usually it.

If he's talking about the _database_ called postgres, it's in the cluster
to provide an unused database that applications can connection to by
default.

> > b) How can I restore the postgres database to a pristine state?
>
> shut down postgres
> delete everything in the $PGDATA directory (or whatever comes after -D
> when it starts up)
> run initdb
> start postgres
>
> All should now be clean and fresh.

Assuming he meant the entire cluster and not just the postgres database.

If the latter, a DROP/CREATE will return it to the normal state.

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran(at)collaborativefusion(dot)com
Phone: 412-422-3463x4023

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Casanova 2008-12-03 17:29:44 two postgres server seeing the same data
Previous Message Scott Marlowe 2008-12-03 16:51:19 Re: Limit on number of databases in a Cluster ?