pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bender, Cheryl <cbender@mriresearch.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Alternate db location
Date: Tue, 07 Sep 2004 19:21:50 -0400
Message-ID: <13140.1094599310@sss.pgh.pa.us> (raw)
In-Reply-To: <D5DB5D0D27171247AFEC9648EE98752F03220125@KCEX2KV1.mri-kc.int>
References: <D5DB5D0D27171247AFEC9648EE98752F03220125@KCEX2KV1.mri-kc.int>

"Bender, Cheryl" <cbender@mriresearch.org> 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



view thread (4+ messages)  latest in thread

Message-ID: <13140.1094599310@sss.pgh.pa.us>
Permalink:  ../13140.1094599310@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13140.1094599310@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, cbender@mriresearch.org
  Subject: Re: Alternate db location
  In-Reply-To: <13140.1094599310@sss.pgh.pa.us>
  References: <D5DB5D0D27171247AFEC9648EE98752F03220125@KCEX2KV1.mri-kc.int> <13140.1094599310@sss.pgh.pa.us>

* 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