Re: Moving PostgreSQL data directory on Windows

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: Ottó Havasvölgyi <havasvolgyi(dot)otto(at)gmail(dot)com>, "Pg - General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Moving PostgreSQL data directory on Windows
Date: 2006-01-13 16:21:48
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C7E80@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hello,
>
> I would like to move the data directory to another location.
> I have done this:
> 1. Stop PostgreSQL
> 2. Move data directory
> 3. Create a PGDATA env. variable to the new location 4. Start
> PostgreSQL
>
> And it cannot start, because it cannot find postgresql.conf.
> (in Event log) What should I do now?

Are you running it as a service:? If so you need to reconfigure the service. Unfortunatly,the only way to do this is using regedit. Go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-8.1

Open the value "ImagePath" and change the data directory.

//Magnus

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2006-01-13 16:22:31 Re: Moving PostgreSQL data directory on Windows
Previous Message rlee0001 2006-01-13 15:53:50 Re: PostgreSQL Top 10 Wishlist