From: | "Nick Fankhauser" <nickf(at)ontko(dot)com> |
---|---|
To: | <rwhart(at)netexpress(dot)net>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: New User - options and other "get going" questions. |
Date: | 2002-04-08 19:27:19 |
Message-ID: | NEBBLAAHGLEEPCGOBHDGOEJPELAA.nickf@ontko.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)ontko(dot)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(at)postgresql(dot)org
> [mailto:pgsql-admin-owner(at)postgresql(dot)org]On Behalf Of BobH
> Sent: Sunday, April 07, 2002 11:12 PM
> To: pgsql-admin(at)postgresql(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Nick Fankhauser | 2002-04-08 21:24:18 | Will an outer join on two indexed fields use the indexes? |
Previous Message | sivagurunathan shanmugham | 2002-04-08 04:57:15 | Doubts in connectivity |