How to I relocate the Postgresql data directory

From: "Vorpal" <vorpalswordsman(at)shaw(dot)ca>
To: <pgsql-general(at)postgresql(dot)org>
Subject: How to I relocate the Postgresql data directory
Date: 2010-10-07 00:53:15
Message-ID: c08cb9$9qpi3f@pd6mo1no-svcs.prod.shaw.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


PostgreSQL was installed as part of other software.
The data folder is a subfolder of D:\Program Files\
Specifically:
"D:\Program Files\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N
"pgsql-8.3" -D "D:\Program Files\PostgreSQL\8.3\data\"

For various reasons I would like the data directory to be:
G:\PostgreSQL\8.3\data\"

I created this directory, and changed the line in the service startup,
however the service threw an error on startup.

What is the correct procedure for re-positioning the data directory.

Thanks,
--Vorpal

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Christensen 2010-10-07 01:18:15 Missing uuid_generate_v1()
Previous Message Raymond O'Donnell 2010-10-06 19:33:17 Re: Idle connections