pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Tomeh, Husam <htomeh@firstam.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Another Data directory for second database - feasible?
Date: Fri, 22 Apr 2005 11:15:06 -0600
Message-ID: <20050422171506.GA91586@winnie.fuhr.org> (raw)
In-Reply-To: <C45835824D00A844BBD0F032D5CDED920116DA52@pisgana01sxch01.ana.firstamdata.com>
References: <C45835824D00A844BBD0F032D5CDED920116DA52@pisgana01sxch01.ana.firstamdata.com>

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/



view thread (7+ messages)  latest in thread

Message-ID: <20050422171506.GA91586@winnie.fuhr.org>
Permalink:  ../20050422171506.GA91586@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050422171506.GA91586@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mike@fuhr.org, htomeh@firstam.com
  Subject: Re: Another Data directory for second database - feasible?
  In-Reply-To: <20050422171506.GA91586@winnie.fuhr.org>
  References: <C45835824D00A844BBD0F032D5CDED920116DA52@pisgana01sxch01.ana.firstamdata.com> <20050422171506.GA91586@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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