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
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 test
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
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?
It'd be a bit of
"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 the
I believe there is a bug, or at least a not very nice feature in initdb.
If initdb does not succeed, it attempts to "exit_nicely". By default
this involved deleting the $PGDATA directory!! So if you have put other
things in you $PGDATA directory or (as in my case) you attempt to create
a
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:115
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 can see
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