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/

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to