Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Bangalore, India

    Unanswered: Postgre Data Directory

    can ne 1 tell how to specify the Data directory while starting Postgre Sql
    ive installed Red hat linux 9.0 in my machine and would like to learn PostgreSql.

    when i start postmaster, it says to specify the data directory using -D option or by PGDATA variable.

    how can i specify the data directory using PGDATA

    thanks in advance


  2. #2
    Join Date
    Oct 2003
    If you only had read the first page of the installation manual, you should have read this:

    gmake install
    adduser postgres
    mkdir /usr/local/pgsql/data
    chown postgres /usr/local/pgsql/data
    su - postgres
    /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
    /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
    /usr/local/pgsql/bin/createdb test
    /usr/local/pgsql/bin/psql test

    Where you can see that a directory ii create, initalized and used for lauching the postmaster.

    Of course, you choose another location for this directory and another owner, but only the owner is able to initialize it and lauch a postmaster with it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts