Thread

  1. Please help On Alternative Database Location

    Francesco Protano <fprotano@yahoo.com> — 2001-03-26T16:18:20Z

    it's sure that this email should to be write to
    anywhere but here, but the various requests to help
    done in some mailings lists about postgresqk are
    failed.So i write you, in the hope to receive an
    response.
    Briefly the question.
    I work under Linux platform, Mandrake 7.2
    distribution, and i need to create a postgres
    database, for example called "mydb", in alternative
    location, for example "/home/username". In the
    official documentation this is very simple to do, but
    in the reality i have failed.
    This is my steps
    1) su - username
    2) set PGDATA2 = "/home/username" (but i tried
    relatives path too)
    3) initlocation $PGDATA2
    4) createdb -D $PGDATA2 mydb
    
    Finally an error message appears like this
    "The database path '/home/username' is invalid. This
    may be due to a character that is not allowed or
    because the chosen path isn't permitted for databases"
    
    
    I tried the relatives paths "~" and "." too, but the
    message is the same.
    Please help me
    I like to know the right procedure step by step
    Thanck you so much
    
    
    __________________________________________________
    Do You Yahoo!?
    Get email at your own domain with Yahoo! Mail. 
    http://personal.mail.yahoo.com/
    
    
  2. Re: Please help On Alternative Database Location

    Tom Lane <tgl@sss.pgh.pa.us> — 2001-03-27T15:34:30Z

    Francesco Protano <fprotano@yahoo.com> writes:
    > I work under Linux platform, Mandrake 7.2
    > distribution, and i need to create a postgres
    > database, for example called "mydb", in alternative
    > location, for example "/home/username". In the
    > official documentation this is very simple to do, but
    > in the reality i have failed.
    > This is my steps
    > 1) su - username
    > 2) set PGDATA2 = "/home/username" (but i tried
    > relatives path too)
    > 3) initlocation $PGDATA2
    > 4) createdb -D $PGDATA2 mydb
    
    The environment variable PGDATA2 needs to be present in the postmaster's
    environment, not only the client's.  Also, leave off the $ in steps 3
    and 4; you are trying to pass the name of the environment variable to
    the postmaster, not its value.
    
    			regards, tom lane
    
    
  3. Re: Please help On Alternative Database Location

    Peter Eisentraut <peter_e@gmx.net> — 2001-03-27T15:53:10Z

    Francesco Protano writes:
    
    > 1) su - username
    > 2) set PGDATA2 = "/home/username" (but i tried
    > relatives path too)
    > 3) initlocation $PGDATA2
    > 4) createdb -D $PGDATA2 mydb
    
    initlocation PGDATA2
    createdb -D PGDATA2 mydb
    
    -- 
    Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/