Re: "initdb -t" destroys all databases - Mailing list pgsql-hackers

From Tom Lane
Subject Re: "initdb -t" destroys all databases
Date
Msg-id 9904.979952012@sss.pgh.pa.us
Whole thread Raw
In response to Re: "initdb -t" destroys all databases  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: "initdb -t" destroys all databases  (Peter Eisentraut <peter_e@gmx.net>)
Re: "initdb -t" destroys all databases  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Any idea if this is fixed?

> Peter, comments?
>> 
>> It doesn't destroy all databases anymore, although I can't make any
>> statements about what it actually does do.  I suppose it's still broken.

Peter did put in a hack to make sure it wouldn't do "rm -rf $PGDATA"
upon failure, but it still doesn't appear to me to offer any non-broken
functionality.  Note my comment in initdb.sh:

# XXX --- I do not believe the "template_only" option can actually work.
# With this coding, it'll fail to make entries for pg_shadow etc. in
# template1 ... tgl 11/2000

It occurs to me that the only likely use for initdb -t is now served byDROP DATABASE template1;CREATE DATABASE
template1WITH TEMPLATE = template0;
 
ie, we have a *real* way to reconstruct a virgin template1 rather than
an initdb kluge.

Accordingly, I suggest that initdb -t should be flushed entirely.
Comments?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: AW: AW: AW: Re: tinterval - operator problems on AIX
Next
From: mlw
Date:
Subject: Re: 7.0.3 reproduceable serious select error