Re: Another Data directory for second database - feasible?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Another Data directory for second database - feasible?
Date: 2005-04-22 17:15:06
Message-ID: 20050422171506.GA91586@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Bruno Wolff III 2005-04-22 17:23:07 Re: Reindex from command line linux
Previous Message Scott Marlowe 2005-04-22 17:03:53 Re: Another Data directory for second database - feasible?