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 F00C5329D83 for ; Wed, 8 Sep 2004 00:21:56 +0100 (BST) 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 19503-03 for ; Tue, 7 Sep 2004 23:21:49 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C2EEA329D86 for ; Wed, 8 Sep 2004 00:21:51 +0100 (BST) 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 i87NLonG013142; Tue, 7 Sep 2004 19:21:50 -0400 (EDT) To: "Bender, Cheryl" Cc: pgsql-admin@postgresql.org Subject: Re: Alternate db location In-reply-to: References: Comments: In-reply-to "Bender, Cheryl" message dated "Tue, 07 Sep 2004 18:09:59 -0500" Date: Tue, 07 Sep 2004 19:21:50 -0400 Message-ID: <13140.1094599310@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: 200409/68 X-Sequence-Number: 14771 "Bender, Cheryl" writes: > I need to add an alternate db location for my 7.3.4 server (running on > FreeBSD 5.2 Release) > I thought I did everything according to the administrator's guide, but I > fail at createdb. How are you starting the postmaster, exactly? A lot of people use start scripts that boil down to something like su - postgres -c "postmaster ..." The "su -" means "throw away the existing environment variables and adopt the environment that would be obtained by logging in from scratch as postgres". So it doesn't matter *what* you do before executing such a script; the environment variables you have won't affect what the postmaster gets. What you have to do to play with such a script is put the export or setenv command into whatever "~postgres/.profile" file will be read by the standard shell that su will invoke. This is what you want anyway, really, since anything you do any other way will be lost in a reboot. This'll all get a lot easier in 8.0, thankfully (no more dependence on environment variables). regards, tom lane