Re: [GENERAL] initdb and "exit_nicely"...
От
Peter Eisentraut
Тема
Re: [GENERAL] initdb and "exit_nicely"...
Дата
Msg-id
Pine.LNX.4.21.0005181457000.349-200000@localhost.localdomain
Ответ на
Re: initdb and "exit_nicely"... (Peter Eisentraut)
Список
I wrote: > Jeffery Collins 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? Here's a patch that might do what you need but I'm somewhat suspicious of this situation. Recycling an old PGDATA directory is not supported, in facts it's explicitly prevented with certain checks in initdb. So apparently you precreated the data directory and put "interesting things" of your own in it, which is not necessarily something that's encouraged either. It does make sense to leave the PGDATA directory and only clean out the _contents_ on failure, that is, use `rm -rf $PGDATA/*' instead of `rm -rf $PGDATA' but I doubt that that can be done portably. -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата: