Skip site navigation (1) Skip section navigation (2)

Re: Re-Init database cluster.

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Louie Kwan <lkwan(at)nuvo(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Re-Init database cluster.
Date: 2004-03-19 15:51:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Wed, 17 Mar 2004, Louie Kwan wrote:

> Hi All,
> I did a pg_dumpall and psql the output and created a db. Basically, I would
> like to clean up  everything including users and groups.
> I tried to do initdb, but it didn't work. 
> My question is that can I just delete the directory where the database
> cluster stored before.
> I.e. rm -rf /var/lib/pgsql/data
> Or I should do something else to re-init the database cluster.

You might wanna back up your pg_hba.conf and postgresql.conf files first, 
if you've got any settings in there you'd like to keep.  but yeah, that's 
the first step.  If you've got the space to back up the whole directory 
I'd advise you do that as well first.

Then initdb --locale=youlocalehere

and you're off.  but like Tom said, what made you wanna do this?  Just 
wanting a fresh start?  Corruption?  etc...?

In response to

pgsql-admin by date

Next:From: Naomi WalkerDate: 2004-03-19 16:20:57
Subject: Re: backup and recovery
Previous:From: Tom LaneDate: 2004-03-19 15:32:50
Subject: Re: unimplemented functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group