From: James Herbers <james@herbers.ca>
To: pgsql-admin@postgresql.org
Subject: PostgreSQL default data location
Date: Thu, 09 Jun 2005 14:53:42 -0600
Message-ID: <42A8AC56.5090808@herbers.ca> (raw)
I am running Trustix 3.0 RC2 and am trying to set the default data
location for PostgreSQL as follows:
I changed the default PostgreSQL data directory by running initdb -D
/vol1/pgsql/data as the postgres user.
Next I edited /etc/sysconfig/postgresql to change the PGDATA variable to
the new directory.
When I try to start postgreSQL it chokes saying the data directory
/var/lib/posgresql/data has not been initilized, which is true but it
should be trying to use the new data directory!
I then also tried editing /etc/sysconfig/postmaster.args to add the -D
/vol1/pgsql/data option to it but this also did not work!
After looking at the /etc/init.d/postgresql script I put a symbolic link
in /etc/sysconfig/postgresql.d to point to the file
/etc/sysconfig/postgresql. Now if I use the command 'service postgrsql
start' everything works fine...But on reboot the same problem occurs,
postgresql tries to use the /var/lib/postgres/data directory still.
What seems weird is that the service command works (or
'/etc/init.d/postgresql start') but if I try to run the script
'/etc/rc3.d/S85postgresql start' it looks for the default data directory
and chokes.
To make a long story short how do I change the default data diretory for
PostgreSQL? What did I do wrong?
James Herbers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: james@herbers.ca
Subject: Re: PostgreSQL default data location
In-Reply-To: <42A8AC56.5090808@herbers.ca>
References: <42A8AC56.5090808@herbers.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox