X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D56C852814 for ; Thu, 9 Jun 2005 17:53:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15574-09 for ; Thu, 9 Jun 2005 20:53:40 +0000 (GMT) Received: from mail.herbers.ca (unknown [64.56.146.199]) by svr1.postgresql.org (Postfix) with ESMTP id 0CF7652822 for ; Thu, 9 Jun 2005 17:53:39 -0300 (ADT) Received: from localhost (unknown [127.0.0.1]) by mail.herbers.ca (herbers) with ESMTP id 9C9921EE1AE for ; Thu, 9 Jun 2005 14:53:41 -0600 (MDT) Received: from mail.herbers.ca ([127.0.0.1]) by localhost (trusty.herbers.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31068-14 for ; Thu, 9 Jun 2005 14:53:40 -0600 (MDT) Received: from [10.1.2.50] (unknown [10.1.2.50]) by mail.herbers.ca (herbers) with ESMTP id 086FE1EE1A8 for ; Thu, 9 Jun 2005 14:53:40 -0600 (MDT) Message-ID: <42A8AC56.5090808@herbers.ca> Date: Thu, 09 Jun 2005 14:53:42 -0600 From: James Herbers User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: PostgreSQL default data location Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at herbers.ca X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/63 X-Sequence-Number: 17818 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