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 3D726D1B4DD for ; Thu, 1 Jul 2004 13:26:01 -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 27368-01 for ; Thu, 1 Jul 2004 16:25:55 +0000 (GMT) Received: from mallaury.noc.nerim.net (smtp-104-thursday.noc.nerim.net [62.4.17.104]) by svr1.postgresql.org (Postfix) with ESMTP id 459ECD1B42F for ; Thu, 1 Jul 2004 13:25:53 -0300 (ADT) Received: from max.my.domain (mey.net1.nerim.net [213.41.158.149]) by mallaury.noc.nerim.net (Postfix) with ESMTP id 773A562E18 for ; Thu, 1 Jul 2004 18:25:50 +0200 (CEST) Received: from jc by max.my.domain with local (Exim 3.35 #1 (Debian)) id 1Bg4Ll-0000PC-00 for ; Thu, 01 Jul 2004 18:23:49 +0200 Date: Thu, 1 Jul 2004 18:23:49 +0200 To: pgsql-admin@postgresql.org Subject: unable to pass variable PGDATA2 into server environment Message-ID: <20040701162349.GA1241@max.my.domain> Mail-Followup-To: pgsql-admin@postgresql.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i From: Jean-Christophe Weis X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/9 X-Sequence-Number: 14077 Hello list, I am a member of the french translation group for the PostgreSQL project. I run PostgreSQL 7.2.1-2 on Debian Linux Woody (3.0r1). I can't reproduce the steps described in Section 18.5 of the PostgreSQL 7.4 Documentation (Server Administration > Managing Databases > Alternative Locations), which has quite the same contents as Section 6.1.2 of the PostgreSQL 7.2.1 Documentation that came with Woody. I have created a containing directory for a new data storage area and made it writable by the user account that runs the server, i.e. 'postgres': | root# ls -ld /home/jc/postgres | drwx------ 3 postgres postgres 4096 Jun 29 19:59 /home/jc/postgres/ The server being shut down, I have created a variable named 'PGDATA2' to reference the new data storage area, and marked it for export: | root# PGDATA2=/home/jc/postgres/data | root# export PGDATA2 I have created the new data storage area under the identity of the database superuser, 'postgres' too: | root# su postgres | postgres$ /usr/lib/postgresql/bin/initlocation PGDATA2 | The location will be initialized with username "postgres". | This user will own all the files and must also own the server process. | | Creating directory /home/jc/postgres/data | Creating directory /home/jc/postgres/data/base | | initlocation is complete. | You can now create a database using | CREATE DATABASE WITH LOCATION = 'PGDATA2' | in SQL, or | createdb -D 'PGDATA2' | from the shell. Apparently everything went fine so far. I have restarted the server, under the root identity: | postgres$ exit | root# /etc/init.d/postgresql start | ... But when I tried to create a database in the new data storage area, under the 'postgres' identity, it failed: | root# su postgres | postgres$ createdb testdb -D 'PGDATA2' | ERROR: Postmaster environment variable 'PGDATA2' not set | createdb: database creation failed And, by the way: | postgres$ createdb testdb -D $PGDATA2 | ERROR: Absolute paths are not allowed as database locations | createdb: database creation failed The variable PGDATA2 is set and marked for export in the root shell where I start the server, but it is not passed into the server's environment. Any Debian user knows if there is something special with Debian and environment variables of the PostgreSQL server? Thanks, -- JC Weis