Re: initdb and "exit_nicely"... - Mailing list pgsql-general

From Jeffery Collins
Subject Re: initdb and "exit_nicely"...
Date
Msg-id 3923E492.B27648E5@onyx-technologies.com
Whole thread Raw
In response to Re: initdb and "exit_nicely"...  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
Tom Lane wrote:

> Peter Eisentraut <peter_e@gmx.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



pgsql-general by date:

Previous
From: Travis Bauer
Date:
Subject: Error in manual
Next
From: Pascal IMBERT
Date:
Subject: connect postgresql to a oracacle database