Re: Another Data directory for second database - feasible? - Mailing list pgsql-admin

From Michael Fuhr
Subject Re: Another Data directory for second database - feasible?
Date
Msg-id 20050422171506.GA91586@winnie.fuhr.org
Whole thread Raw
In response to Another Data directory for second database - feasible?  ("Tomeh, Husam" <htomeh@firstam.com>)
List pgsql-admin
On Fri, Apr 22, 2005 at 09:10:35AM -0700, Tomeh, Husam wrote:
>
> I have a postgres installation with one database on a server. I'd need
> to create another database; however, I'm curious if there's a way to
> create the second database in a different directory than the existing
> one. Is that feasible and how? Or does postgres only point to one data
> directory?  Thanks in advance.

Each database is stored in its own directory, usually under
$PGDATA/base.  Do you mean you want to create a database somewhere
else?  What version of PostgreSQL are you using?  8.0 and later
support tablespaces; in previous versions you could use the technique
described in the "Alternative Locations" section of the "Managing
Databases" chapter in the documentation.

http://www.postgresql.org/docs/8.0/interactive/manage-ag-tablespaces.html
http://www.postgresql.org/docs/8.0/interactive/sql-createdatabase.html

http://www.postgresql.org/docs/7.4/interactive/manage-ag-alternate-locs.html
http://www.postgresql.org/docs/7.4/interactive/sql-createdatabase.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-admin by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Another Data directory for second database - feasible?
Next
From: "Tomeh, Husam"
Date:
Subject: Re: Another Data directory for second database -