pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedNew User - options and other "get going" questions.
3+ messages / 3 participants
[nested] [flat]
* New User - options and other "get going" questions.
@ 2002-04-08 04:12 BobH <rwhart@netexpress.net>
0 siblings, 2 replies; 3+ messages in thread
From: BobH @ 2002-04-08 04:12 UTC (permalink / raw)
To: pgsql-admin
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!
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: New User - options and other "get going" questions.
@ 2002-04-08 04:29 Peter Eisentraut <peter_e@gmx.net>
parent: BobH <rwhart@netexpress.net>
1 sibling, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2002-04-08 04:29 UTC (permalink / raw)
To: BobH <rwhart@netexpress.net>; +Cc: pgsql-admin
BobH writes:
> 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.
It's set somewhere in the init script. (The exact location may vary with
the version.) It might be easier to make a symlink from the "standard"
location to your desired location.
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: New User - options and other "get going" questions.
@ 2002-04-08 19:27 Nick Fankhauser <nickf@ontko.com>
parent: BobH <rwhart@netexpress.net>
1 sibling, 0 replies; 3+ messages in thread
From: Nick Fankhauser @ 2002-04-08 19:27 UTC (permalink / raw)
To: rwhart@netexpress.net; pgsql-admin
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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-04-08 19:27 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 04:12 New User - options and other "get going" questions. BobH <rwhart@netexpress.net>
2002-04-08 04:29 ` Peter Eisentraut <peter_e@gmx.net>
2002-04-08 19:27 ` Nick Fankhauser <nickf@ontko.com>
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