Re: initdb and "exit_nicely"...

From: Jeffery Collins <collins(at)onyx-technologies(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: initdb and "exit_nicely"...
Date: 2000-05-18 12:39:46
Message-ID: 3923E492.B27648E5@onyx-technologies.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Tom Lane wrote:

> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> >> It seems like it would be a whole lot "nicer" if initdb only deleted
> >> the files that it attempted to create OR if the default was not to
> >> delete anything.
>
> > Okay, I could go for the former. What do others think?
>
> It'd be a bit of a pain but I can see the problem. You certainly
> shouldn't delete the $PGDATA directory itself unless you created it,
> IMHO. Doing more than that would imply that initdb's cleanup
> function would have to know the list of files/subdirectories that
> normally get created during initdb, so as to remove only those and
> not anything else that might be lying around in the directory.
> That'd be a considerable maintenance headache since most of said files
> are not created directly by the script...
>

I agree this would be a pain. After thinking about it, I think the best
approach is to do one or both of the following:

- Change the default to not delete $PGDATA.
- Prompt the user for confirmation before deleting $PGDATA.

Anything else sounds like a pain in the *ss and very error prone.

Jeff Collins

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Travis Bauer 2000-05-18 13:40:01 Error in manual
Previous Message Jeffery Collins 2000-05-18 12:29:49 Passing arguments to and INDEX function.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-05-18 14:24:56 Re: question about index cost estimates
Previous Message Dave Page 2000-05-18 11:28:52 RE: MSSQL7 & PostgreSQL 7.0