Skip site navigation (1) Skip section navigation (2)

initdb

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: initdb
Date: 2003-10-01 20:03:44
Message-ID: 3F7B3320.8010009@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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 removed at 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


Responses

  • Re: initdb at 2003-10-01 20:54:32 from Peter Eisentraut

pgsql-hackers by date

Next:From: scott.marloweDate: 2003-10-01 20:29:43
Subject: Re: Lost mails
Previous:From: Joshua D. DrakeDate: 2003-10-01 20:02:47
Subject: Re: Thoughts on maintaining 7.3

pgsql-patches by date

Next:From: Peter EisentrautDate: 2003-10-01 20:54:32
Subject: Re: initdb
Previous:From: David WalterDate: 2003-10-01 13:23:10
Subject: pg_dump --table=* dumps nothing?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group