Re: "initdb -t" destroys all databases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Richard Poole <richard(dot)poole(at)vi(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: "initdb -t" destroys all databases
Date: 2001-01-20 00:53:32
Message-ID: 9904.979952012@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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 by
DROP DATABASE template1;
CREATE DATABASE template1 WITH 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cameron Laird 2001-01-20 01:28:53 question
Previous Message Peter Eisentraut 2001-01-19 23:24:15 Re: AW: AW: AW: Re: tinterval - operator problems on AIX