Re: [GENERAL] initdb and "exit_nicely"...

2000-05-25 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > How do you find out if a directory is empty? Good question. > The best way I could think of is this: > test x"`ls -A "$PGDATA"`" = x The embedded quotes might confuse some shells, no? Perhaps better CONTENTS=`ls -A "$PGDATA"` if t

Re: [GENERAL] initdb and "exit_nicely"...

2000-05-25 Thread Peter Eisentraut
Tom Lane writes: > The idea I suggested a couple of days ago was that initdb should refuse > to run if PGDATA exists and is nonempty. Sound reasonable? Okay, let's do that. How do you find out if a directory is empty? The best way I could think of is this: test x"`ls -A "$PGDATA"`" = x Are we

Re: [GENERAL] initdb and "exit_nicely"...

2000-05-18 Thread Tom Lane
"Len Morgan" <[EMAIL PROTECTED]> writes: > The reason that IMHO this deserves a little consideration (i.e., doing it at > all rather than just saying "Don't store any files in PG_DATA") is that > RedHat based rpm installations create the postgres superuser account as part > of the process and set

Re: [GENERAL] initdb and "exit_nicely"...

2000-05-18 Thread Jeffery Collins
Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> 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? > > I

Re: [GENERAL] initdb and "exit_nicely"...

2000-05-18 Thread Len Morgan
>> A slightly more reasonable example is where the admin has already >> inserted his own pg_hba.conf in the directory; would be nice if initdb >> didn't overwrite it (nor delete it on failure), but I'm not sure it's >> worth the trouble. > >I am inclined to leave it as is too. I can imagine many

Re: [GENERAL] initdb and "exit_nicely"...

2000-05-17 Thread Bruce Momjian
> A slightly more reasonable example is where the admin has already > inserted his own pg_hba.conf in the directory; would be nice if initdb > didn't overwrite it (nor delete it on failure), but I'm not sure it's > worth the trouble. I am inclined to leave it as is too. I can imagine many bug re

Re: [GENERAL] initdb and "exit_nicely"...

2000-05-17 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> 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 ca

Re: [GENERAL] initdb and "exit_nicely"...

2000-05-17 Thread Peter Eisentraut
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? -- Peter Eisentraut Sernanders väg 10:1