Results 1 to 2 of 2

Thread: Starting postgres with different '-D' value

  1. #1
    Join Date
    Aug 2008

    Question Starting postgres with different '-D' value

    Hi there,

    After installing postgres using apt-get, when I run:

    sudo /etc/init.d/postgresql-8.3 start

    The service starts with this process:

    /usr/lib/postgresql/8.3/bin/postgres -D /var/lib/postgresql/8.3/main -c config_file=/etc/postgresql/8.3/main/postgresql.conf

    The issue is, the database was initialized using 'initdb' to a different directory. So it is not in '/var/lib/postgresql/8.3/main'. I would need to be able to startup the service with a different value for the '-D' parameter. Do you know how to do this?

    I would be very grateful to any help.
    Thank you in advance,


  2. #2
    Join Date
    May 2007
    Phoenix, Arizona USA
    Ubuntu 8.04 Hardy Heron

    Re: Starting postgres with different '-D' value

    The -D paramter just tells Postgres where to find the database. Just change you value after the -D to reflect the location where you intitialized the database.


    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

Tags for this Thread


Posting Permissions

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