pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRe-Init database cluster.
3+ messages / 3 participants
[nested] [flat]
* Re-Init database cluster.
@ 2004-03-17 21:45 Louie Kwan <lkwan@nuvo.com>
0 siblings, 2 replies; 3+ messages in thread
From: Louie Kwan @ 2004-03-17 21:45 UTC (permalink / raw)
To: pgsql-admin
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.
Louie
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Re-Init database cluster.
@ 2004-03-18 03:17 Tom Lane <tgl@sss.pgh.pa.us>
parent: Louie Kwan <lkwan@nuvo.com>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2004-03-18 03:17 UTC (permalink / raw)
To: Louie Kwan <lkwan@nuvo.com>; +Cc: pgsql-admin
Louie Kwan <lkwan@nuvo.com> writes:
> 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
Yup, that's the standard way ... however, maybe you should tell us
exactly what "didn't work". Otherwise you'll likely just fail again.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Re-Init database cluster.
@ 2004-03-19 15:51 scott.marlowe <scott.marlowe@ihs.com>
parent: Louie Kwan <lkwan@nuvo.com>
1 sibling, 0 replies; 3+ messages in thread
From: scott.marlowe @ 2004-03-19 15:51 UTC (permalink / raw)
To: Louie Kwan <lkwan@nuvo.com>; +Cc: 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...?
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-03-19 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-03-17 21:45 Re-Init database cluster. Louie Kwan <lkwan@nuvo.com>
2004-03-18 03:17 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-03-19 15:51 ` scott.marlowe <scott.marlowe@ihs.com>
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