Re: changing the default directory

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: User Map <map(dot)user(at)yahoo(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: changing the default directory
Date: 2008-01-24 13:18:23
Message-ID: 4798901F.5010502@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 24/01/2008 13:02, User Map wrote:

> i am new to this postgre, i m running postgre under windows server 2003.
> postgres stores the database/data in the directory "C:\Program
> Files\PostgreSQL\8.2\data" by default. i want to change this directory
> to some other drive. is it posible to do this without comand prompt. if
> it is not then how to do that step by step. and does this one time
> directory change applies to every database that i will create through
> pgadminIII.

Hi,

The data directory is set by using initdb. If you installed using the
pgInstaller, then setting the data directory was one of the steps along
the way....and I don't think you can change that using pgInstaller
without un- and re-installing PostgreSQL altogether (others will correct
me if I'm wrong).

However, it's easy to run initdb from the command line, and this will
let you create a new data directory without having to uninstall first.
Have a look at the docs, here:

http://www.postgresql.org/docs/8.2/static/creating-cluster.html

It's pretty much the same on Windows as on *nix.

HTH,

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Schwarzer 2008-01-24 13:41:25 Re: Forgot to dump old data before re-installing machine
Previous Message User Map 2008-01-24 13:02:49 changing the default directory