Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 5475C476048 for ; Wed, 17 Apr 2002 23:51:27 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g3I3pUF05933; Wed, 17 Apr 2002 23:51:31 -0400 (EDT) To: Charlie Toohey Cc: pgsql-admin@postgresql.org Subject: Re: Alternate database locations In-reply-to: <20020417184938.BFD10475469@postgresql.org> References: <20020417184938.BFD10475469@postgresql.org> Comments: In-reply-to Charlie Toohey message dated "Wed, 17 Apr 2002 11:49:38 -0700" Date: Wed, 17 Apr 2002 23:51:30 -0400 Message-ID: <5930.1019101890@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200204/169 X-Sequence-Number: 4057 Charlie Toohey writes: > 1. Since the pg_ctl -D option only appears to take a single location, should > this be set to the location of the template1 database created as part of the > Postgres installation, or, do I have to somehow specify the location of each > of my databases in alternate locations when starting Postgres ? -D points at the root of the data directory, a/k/a $PGDATA. This is where postgresql.conf and some other installation-wide files live. Individual databases are normally subdirectories under $PGDATA/base/, but can be relocated elsewhere using the "alternate database location" mechanism. > I am using the startup script from the contrib/start-scripts/linux directory > of PostgreSQL source (v. 7.1.3), so I define an environment variable within > this file, prior to the command to start the server --- let's say it is > defined as : > PGDATA_ALTERNATE="/home/alternate/pgsql/data" I think you also need "export PGDATA_ALTERNATE"; otherwise it's only a local variable in that shell script. regards, tom lane