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 7B682D1B55A for ; Thu, 1 Jul 2004 14:55:27 -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 69729-06 for ; Thu, 1 Jul 2004 17:55:22 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id E1C9BD1B53A for ; Thu, 1 Jul 2004 14:55:20 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i61HtJM7029054; Thu, 1 Jul 2004 13:55:19 -0400 (EDT) To: Jean-Christophe Weis Cc: pgsql-admin@postgresql.org Subject: Re: unable to pass variable PGDATA2 into server environment In-reply-to: <20040701162349.GA1241@max.my.domain> References: <20040701162349.GA1241@max.my.domain> Comments: In-reply-to Jean-Christophe Weis message dated "Thu, 01 Jul 2004 18:23:49 +0200" Date: Thu, 01 Jul 2004 13:55:19 -0400 Message-ID: <29053.1088704519@sss.pgh.pa.us> From: Tom Lane 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/11 X-Sequence-Number: 14079 Jean-Christophe Weis writes: > 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. No, because the start script is going to su to the postgres account, and su is going to reset the environment. The usual advice for doing this sort of thing is to set the environment variable in the postgres user's .profile file. That way the postmaster has it, and you also have it if you manually su to postgres. (This whole benighted environment-variable scheme is gone in CVS tip, thank goodness.) regards, tom lane