The following code is in initdb.sh:
exit_nicely(){ stty echo > /dev/null 2>&1 echo 1>&2 echo "$CMDNAME: failed" 1>&2 if [ "$noclean" != yes ]; then
if [ "$made_new_pgdata" = yes ]; then echo "$CMDNAME: removing data directory \"$PGDATA\"" 1>&2
rm -rf "$PGDATA" || echo "$CMDNAME: failed" 1>&2 fi else echo "$CMDNAME: data directory \"$PGDATA\" not
removedat user's
request" 1>&2 fi exit 1
}
So if the data directory previously existed and was empty, we don't
clean it out on error, even if we didn't use the noclean flag. Is this
intended behaviour or a bug? (If a bug it's trivially easy to fix.)
cheers
andrew