From: Nick Fankhauser <nickf@ontko.com>
To: rwhart@netexpress.net
To: pgsql-admin@postgresql.org
Subject: Re: New User - options and other "get going" questions.
Date: Mon, 8 Apr 2002 14:27:19 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGOEJPELAA.nickf@ontko.com> (raw)
In-Reply-To: <3CB118A4.1020406@netexpress.net>
Bob-
I'm pasting in a chunk from some of my local documentation for our system.
In our case, we don't touch the default, but rather set up some new
locations, but you may want to do something similar, and the description of
the process may help if you still want to change the default location. The
bits in parentheses are examples of the commands that work on our system-
you'll want to substitute your own directories and database names of course.
1)If an initdb was not done by the package install, you may have to do it:
(su; su - postgres; initdb)
2)Create the directories that you want the database(s) to live in. Make the
directory owner postgres (mkdir /data/staging; chown postgres /data/staging)
3)Define DB data locations as environment variables in
/var/lib/postgres/.profile eg: export PG_STAGING=/data/staging
4)Restart postmaster to pick up the new env variable: /etc/init.d/postgresql
restart
5)Initialize the database location: (su - postgres; initlocation PG_STAGING)
6)Create the database: (createdb staging -D PG_STAGING)
Regards,
-Nick
--------------------------------------------------------------------------
Nick Fankhauser nickf@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788
Ray Ontko & Co. Software Consulting Services http://www.ontko.com/> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of BobH
> Sent: Sunday, April 07, 2002 11:12 PM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] New User - options and other "get going" questions.
>
>
> Hi,
> I have just installed the lastest PostGreSQL version as an RPM. I am
> using the /etc/init.d/postgresql file provided to start and stop.
> I am not
> that conversant with shell programming (YET).
>
> I want to keep tables in "/rwhdata2/data" rather than
> /var/lib/pgsql/data". I presume that $PGDATA is set to
> "/var/lib/pgsql/data", but I can't find out where.
>
> Typing "echo $PGDATA" logged in as either root or postgres returns a
> blank line. Can someone point me in the right direction. I have three
> books on my desk that purport to explain Postgresql and they all mention
> PGDATA but none clearly delineate where it is set.
>
> Thanks,
>
> Bob
>
> Please reply directly as I am not sure that I am getting any list traffic
> even though I checked to receive all messages when I subscribed. Thanks!
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
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: nickf@ontko.com, rwhart@netexpress.net
Subject: Re: New User - options and other "get going" questions.
In-Reply-To: <NEBBLAAHGLEEPCGOBHDGOEJPELAA.nickf@ontko.com>
References: <3CB118A4.1020406@netexpress.net> <NEBBLAAHGLEEPCGOBHDGOEJPELAA.nickf@ontko.com>
* 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