Thread: Moving PostgreSQL data directory on Windows
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? Thanks, Otto
Ottó Havasvölgyi <havasvolgyi.otto@gmail.com> writes: > 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? > Dumb question, but are you sure you exported the PGDATA variable? Is it pointing to the directory that actually contains postgresql.conf? If you still have problems, post the exact error message that appears in the logs. -Doug
> 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 usingregedit. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-8.1 Open the value "ImagePath" and change the data directory. //Magnus
Doug McNaught <doug@mcnaught.org> writes: > Dumb question, but are you sure you exported the PGDATA variable? Is > it pointing to the directory that actually contains postgresql.conf? > > If you still have problems, post the exact error message that appears > in the logs. Duh, I didn't read the subject line and assumed it was on Unix. :) -Doug
"Magnus Hagander" <mha@sollentuna.net> writes: >> [ changing PGDATA doesn't seem to work on Windows ] > Are you running it as a service:? If so you need to reconfigure the service. Unfortunatly,the only way to do this is usingregedit. Go to > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-8.1 Is this documented anywhere? Certainly our SGML manuals don't talk about anything except the Unix case. Perhaps there needs to be a chapter in the Server Administration section about managing a Windows PG server. Or is all that in the installer docs? regards, tom lane
Magnus, It's a service, and it is 8.0.6. I have fixed the registry to this value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" runservice -N "pgsql-8.0" -D "E:\PostgreSQL\data\" The service does not start. This new directory definetely exists. But now there is no Event log entry about the error. The log file says nothing because it is in the data/pg_log directory. Thanks, Otto 2006/1/13, Magnus Hagander <mha@sollentuna.net>: > > 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 usingregedit. Go to > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-8.1 > > Open the value "ImagePath" and change the data directory. > > //Magnus >
Directory permissions for user the user running the service? Ottó Havasvölgyi wrote: >Magnus, > >It's a service, and it is 8.0.6. I have fixed the registry to this >value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" runservice -N >"pgsql-8.0" -D "E:\PostgreSQL\data\" > >The service does not start. >This new directory definetely exists. But now there is no Event log >entry about the error. The log file says nothing because it is in the >data/pg_log directory. > >Thanks, >Otto > > > >2006/1/13, Magnus Hagander <mha@sollentuna.net>: > > >>>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 usingregedit. Go to >>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pgsql-8.1 >> >>Open the value "ImagePath" and change the data directory. >> >>//Magnus >> >> >> > >---------------------------(end of broadcast)--------------------------- >TIP 6: explain analyze is your friend > > >
Ok, two things: First, when using this method, yo uhave to reboot after editing the registry. If you didn't do that, then that's your problem.Sorry, forgot to mention that. If not, then looking at permissions as Rodrigo suggested is the next step. Second, there is of course a nicer way of doing this than editing the registry, that I compleetley forgot about. It's stillnot as nice as you would want, but it should work. You use pg_ctl unregister to remove the service, and then pg_ctlregister to register a new one with the new data directory. Doing this you won't hvae to reboot. Perhaps this is something we should add to pg_ctl for 8.2? "pg_ctl reconfigure" or something like that? What do others think? //Magnus > -----Original Message----- > From: Ottó Havasvölgyi [mailto:havasvolgyi.otto@gmail.com] > Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows > > Magnus, > > It's a service, and it is 8.0.6. I have fixed the registry to this > value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" > runservice -N "pgsql-8.0" -D "E:\PostgreSQL\data\" > > The service does not start. > This new directory definetely exists. But now there is no > Event log entry about the error. The log file says nothing > because it is in the data/pg_log directory. > > Thanks, > Otto > > > > 2006/1/13, Magnus Hagander <mha@sollentuna.net>: > > > 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 > > >
Hello, Ok. I did not set any security on the machine. Only I have access to it. Now I have done this: 0. Registry is modified (yesterday) 1. Restart today 2. Modify registry to the old value 3. Start PostgreSQL -> pg_ctl and postmaster are running (they are in the task list), but no postgres 4. "pg_ctl status" says that neither postmaster nor postgres are running. No new entry in event log. 5. Stop with "pg_ctl stop" -> it says "Could not send stop signal (PID 3624): no such process". There is really no such PID. 6. Restart Windows -> the same as before 7. Stop PostgreSQL from the Sart menu -> it took a half minute, and now only postmaster is running. 8. pg_ctl unregister -N "pgsql-8.0" -> seems it succeeded 9. Register on the new location 10. Start with "net start "pgsql-8.0"" -> The service could not be started, no event log entry. Perhaps because a postmaster isrunning. 11. Kill postmaster, I cannot stop it in other way. 12. Start from Start menu and "net start", but nothing happens. The same message as in step 10. 13. Start from Control panel - Services -> Message: "The service started then stopped." Now I really don't know how to start this. Perhaps reinstaling Postgres is easier. 14. Modified all this with the installer, but PostgreSQL does not start. 15. Backup data directory 16. Uninstall PostgreSQL 17. Install PostgreSQL 8.0.6 (this was installed before), as service, set the same passwords. 18. Stop PostgreSQL 19. Move the backuped data directory to the location PostgreSQL uses. 20. Start PostgreSQL now, but it does not start this way. :( What can be done to use my old data? It's not that critical, only tests. Thanks, Otto 2006/1/14, Magnus Hagander <mha@sollentuna.net>: > Ok, two things: > > First, when using this method, yo uhave to reboot after editing the registry. If you didn't do that, then that's your problem.Sorry, forgot to mention that. If not, then looking at permissions as Rodrigo suggested is the next step. > > Second, there is of course a nicer way of doing this than editing the registry, that I compleetley forgot about. It's stillnot as nice as you would want, but it should work. You use pg_ctl unregister to remove the service, and then pg_ctlregister to register a new one with the new data directory. Doing this you won't hvae to reboot. > > > Perhaps this is something we should add to pg_ctl for 8.2? "pg_ctl reconfigure" or something like that? What do othersthink? > > //Magnus > > > -----Original Message----- > > From: Ottó Havasvölgyi [mailto:havasvolgyi.otto@gmail.com] > > Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows > > > > Magnus, > > > > It's a service, and it is 8.0.6. I have fixed the registry to this > > value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" > > runservice -N "pgsql-8.0" -D "E:\PostgreSQL\data\" > > > > The service does not start. > > This new directory definetely exists. But now there is no > > Event log entry about the error. The log file says nothing > > because it is in the data/pg_log directory. > > > > Thanks, > > Otto > > > > > > > > 2006/1/13, Magnus Hagander <mha@sollentuna.net>: > > > > 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 > > > > > >
Hi, I was just doing the same thing this morning, well somewhat the same; anyways, what I did was 1. uninstall Postgres, and run the installation again(don't use the upgrade.bat), same major version. 2. on the initial installation window, choose a new data directory by clicking on browse, point to your new location of data directory (the directory where you moved the data) 3. make sure you enable the run as service 4. don't initialize cluster db, uncheck it. 5. continue with installation. 6. you should be able to start the service from the services msc. Regards, Jonel Rienton -- I know not english well, but I know 9 computer languages. Pinoy Ako! -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ottó Havasvölgyi Sent: Saturday, January 14, 2006 7:38 AM To: Magnus Hagander Cc: Pg - General Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows Hello, Ok. I did not set any security on the machine. Only I have access to it. Now I have done this: 0. Registry is modified (yesterday) 1. Restart today 2. Modify registry to the old value 3. Start PostgreSQL -> pg_ctl and postmaster are running (they are in the task list), but no postgres 4. "pg_ctl status" says that neither postmaster nor postgres are running. No new entry in event log. 5. Stop with "pg_ctl stop" -> it says "Could not send stop signal (PID 3624): no such process". There is really no such PID. 6. Restart Windows -> the same as before 7. Stop PostgreSQL from the Sart menu -> it took a half minute, and now only postmaster is running. 8. pg_ctl unregister -N "pgsql-8.0" -> seems it succeeded 9. Register on the new location 10. Start with "net start "pgsql-8.0"" -> The service could not be started, no event log entry. Perhaps because a postmaster isrunning. 11. Kill postmaster, I cannot stop it in other way. 12. Start from Start menu and "net start", but nothing happens. The same message as in step 10. 13. Start from Control panel - Services -> Message: "The service started then stopped." Now I really don't know how to start this. Perhaps reinstaling Postgres is easier. 14. Modified all this with the installer, but PostgreSQL does not start. 15. Backup data directory 16. Uninstall PostgreSQL 17. Install PostgreSQL 8.0.6 (this was installed before), as service, set the same passwords. 18. Stop PostgreSQL 19. Move the backuped data directory to the location PostgreSQL uses. 20. Start PostgreSQL now, but it does not start this way. :( What can be done to use my old data? It's not that critical, only tests. Thanks, Otto 2006/1/14, Magnus Hagander <mha@sollentuna.net>: > Ok, two things: > > First, when using this method, yo uhave to reboot after editing the registry. If you didn't do that, then that's your problem. Sorry, forgot to mention that. If not, then looking at permissions as Rodrigo suggested is the next step. > > Second, there is of course a nicer way of doing this than editing the registry, that I compleetley forgot about. It's still not as nice as you would want, but it should work. You use pg_ctl unregister to remove the service, and then pg_ctl register to register a new one with the new data directory Doing this you won't hvae to reboot.. > > > Perhaps this is something we should add to pg_ctl for 8.2? "pg_ctl reconfigure" or something like that? What do others think? > > //Magnus > > > -----Original Message----- > > From: Ottó Havasvölgyi [mailto:havasvolgyi.otto@gmail.com] > > Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows > > > > Magnus, > > > > It's a service, and it is 8.0.6. I have fixed the registry to this > > value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" > > runservice -N "pgsql-8.0" -D "E:\PostgreSQL\data\" > > > > The service does not start. > > This new directory definetely exists. But now there is no Event log > > entry about the error. The log file says nothing because it is in > > the data/pg_log directory. > > > > Thanks, > > Otto > > > > > > > > 2006/1/13, Magnus Hagander <mha@sollentuna.net>: > > > > 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 > > > > > > ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.17/228 - Release Date: 1/12/2006
Jonel, I have initialized a new cluster in the installation (you did not), but that should not have mattered, should it? Best Regards, Otto 2006/1/15, Jonel Rienton <jonel@rientongroup.com>: > Hi, > > I was just doing the same thing this morning, well somewhat the same; > anyways, what I did was > > 1. uninstall Postgres, and run the installation again(don't use the > upgrade.bat), same major version. > 2. on the initial installation window, choose a new data directory by > clicking on browse, point to your new location of data directory (the > directory where you moved the data) > 3. make sure you enable the run as service > 4. don't initialize cluster db, uncheck it. > 5. continue with installation. > 6. you should be able to start the service from the services msc. > > Regards, > > > Jonel Rienton > > -- > I know not english well, but I know 9 computer languages. > Pinoy Ako! > > -----Original Message----- > From: pgsql-general-owner@postgresql.org > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ottó Havasvölgyi > Sent: Saturday, January 14, 2006 7:38 AM > To: Magnus Hagander > Cc: Pg - General > Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows > > Hello, > > Ok. I did not set any security on the machine. Only I have access to it. Now > I have done this: > > 0. Registry is modified (yesterday) > 1. Restart today > 2. Modify registry to the old value > 3. Start PostgreSQL -> pg_ctl and postmaster are running (they are in the > task list), but no postgres 4. "pg_ctl status" says that neither postmaster > nor postgres are running. No new entry in event log. > 5. Stop with "pg_ctl stop" -> it says "Could not send stop signal (PID > 3624): no such process". There is really no such PID. > 6. Restart Windows -> the same as before 7. Stop PostgreSQL from the Sart > menu -> it took a half minute, and now only postmaster is running. > 8. pg_ctl unregister -N "pgsql-8.0" -> seems it succeeded 9. Register on the > new location 10. Start with "net start "pgsql-8.0"" -> The service could not > be started, no event log entry. Perhaps because a postmaster isrunning. > 11. Kill postmaster, I cannot stop it in other way. > 12. Start from Start menu and "net start", but nothing happens. The same > message as in step 10. > 13. Start from Control panel - Services -> Message: "The service started > then stopped." > > Now I really don't know how to start this. > Perhaps reinstaling Postgres is easier. > > 14. Modified all this with the installer, but PostgreSQL does not start. > 15. Backup data directory > 16. Uninstall PostgreSQL > 17. Install PostgreSQL 8.0.6 (this was installed before), as service, set > the same passwords. > 18. Stop PostgreSQL > 19. Move the backuped data directory to the location PostgreSQL uses. > 20. Start PostgreSQL now, but it does not start this way. :( > > What can be done to use my old data? It's not that critical, only tests. > > Thanks, > Otto > > > > > 2006/1/14, Magnus Hagander <mha@sollentuna.net>: > > Ok, two things: > > > > First, when using this method, yo uhave to reboot after editing the > registry. If you didn't do that, then that's your problem. Sorry, forgot to > mention that. If not, then looking at permissions as Rodrigo suggested is > the next step. > > > > Second, there is of course a nicer way of doing this than editing the > registry, that I compleetley forgot about. It's still not as nice as you > would want, but it should work. You use pg_ctl unregister to remove the > service, and then pg_ctl register to register a new one with the new data > directory Doing this you won't hvae to reboot.. > > > > > > Perhaps this is something we should add to pg_ctl for 8.2? "pg_ctl > reconfigure" or something like that? What do others think? > > > > //Magnus > > > > > -----Original Message----- > > > From: Ottó Havasvölgyi [mailto:havasvolgyi.otto@gmail.com] > > > Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows > > > > > > Magnus, > > > > > > It's a service, and it is 8.0.6. I have fixed the registry to this > > > value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" > > > runservice -N "pgsql-8.0" -D "E:\PostgreSQL\data\" > > > > > > The service does not start. > > > This new directory definetely exists. But now there is no Event log > > > entry about the error. The log file says nothing because it is in > > > the data/pg_log directory. > > > > > > Thanks, > > > Otto > > > > > > > > > > > > 2006/1/13, Magnus Hagander <mha@sollentuna.net>: > > > > > 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 > > > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.371 / Virus Database: 267.14.17/228 - Release Date: 1/12/2006 > > >
Hi Otto, The reason I didn't initialized a new cluster is because I was going to use the old cluster that I have, just pointed the data directory to that location in the installation and everything worked fine so I was able to roll back to my 8.1.1 install from 8.1.2. You can set the old location during the installation right in the initial setup when it ask you what would like to install, where the PgAdmin, pl/java section shows. Just highlight the Data Directory and click on browse, then point to the location of your cluster. Regards, Jonel Rienton -- I know not english well, but I know 9 computer languages. Pinoy Ako! -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ottó Havasvölgyi Sent: Saturday, January 14, 2006 7:46 PM To: Pg - General Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows Jonel, I have initialized a new cluster in the installation (you did not), but that should not have mattered, should it? Best Regards, Otto 2006/1/15, Jonel Rienton <jonel@rientongroup.com>: > Hi, > > I was just doing the same thing this morning, well somewhat the same; > anyways, what I did was > > 1. uninstall Postgres, and run the installation again(don't use the > upgrade.bat), same major version. > 2. on the initial installation window, choose a new data directory by > clicking on browse, point to your new location of data directory (the > directory where you moved the data) 3. make sure you enable the run as > service 4. don't initialize cluster db, uncheck it. > 5. continue with installation. > 6. you should be able to start the service from the services msc. > > Regards, > > > Jonel Rienton > > -- > I know not english well, but I know 9 computer languages. > Pinoy Ako! > > -----Original Message----- > From: pgsql-general-owner@postgresql.org > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ottó > Havasvölgyi > Sent: Saturday, January 14, 2006 7:38 AM > To: Magnus Hagander > Cc: Pg - General > Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows > > Hello, > > Ok. I did not set any security on the machine. Only I have access to > it. Now I have done this: > > 0. Registry is modified (yesterday) > 1. Restart today > 2. Modify registry to the old value > 3. Start PostgreSQL -> pg_ctl and postmaster are running (they are in > the task list), but no postgres 4. "pg_ctl status" says that neither > postmaster nor postgres are running. No new entry in event log. > 5. Stop with "pg_ctl stop" -> it says "Could not send stop signal (PID > 3624): no such process". There is really no such PID. > 6. Restart Windows -> the same as before 7. Stop PostgreSQL from the > Sart menu -> it took a half minute, and now only postmaster is running. > 8. pg_ctl unregister -N "pgsql-8.0" -> seems it succeeded 9. Register > on the new location 10. Start with "net start "pgsql-8.0"" -> The > service could not be started, no event log entry. Perhaps because a postmaster isrunning. > 11. Kill postmaster, I cannot stop it in other way. > 12. Start from Start menu and "net start", but nothing happens. The > same message as in step 10. > 13. Start from Control panel - Services -> Message: "The service > started then stopped." > > Now I really don't know how to start this. > Perhaps reinstaling Postgres is easier. > > 14. Modified all this with the installer, but PostgreSQL does not start. > 15. Backup data directory > 16. Uninstall PostgreSQL > 17. Install PostgreSQL 8.0.6 (this was installed before), as service, > set the same passwords. > 18. Stop PostgreSQL > 19. Move the backuped data directory to the location PostgreSQL uses. > 20. Start PostgreSQL now, but it does not start this way. :( > > What can be done to use my old data? It's not that critical, only tests. > > Thanks, > Otto > > > > > 2006/1/14, Magnus Hagander <mha@sollentuna.net>: > > Ok, two things: > > > > First, when using this method, yo uhave to reboot after editing the > registry. If you didn't do that, then that's your problem. Sorry, > forgot to mention that. If not, then looking at permissions as Rodrigo > suggested is the next step. > > > > Second, there is of course a nicer way of doing this than editing > > the > registry, that I compleetley forgot about. It's still not as nice as > you would want, but it should work. You use pg_ctl unregister to > remove the service, and then pg_ctl register to register a new one > with the new data directory Doing this you won't hvae to reboot.. > > > > > > Perhaps this is something we should add to pg_ctl for 8.2? "pg_ctl > reconfigure" or something like that? What do others think? > > > > //Magnus > > > > > -----Original Message----- > > > From: Ottó Havasvölgyi [mailto:havasvolgyi.otto@gmail.com] > > > Subject: Re: [GENERAL] Moving PostgreSQL data directory on Windows > > > > > > Magnus, > > > > > > It's a service, and it is 8.0.6. I have fixed the registry to this > > > value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" > > > runservice -N "pgsql-8.0" -D "E:\PostgreSQL\data\" > > > > > > The service does not start. > > > This new directory definetely exists. But now there is no Event > > > log entry about the error. The log file says nothing because it is > > > in the data/pg_log directory. > > > > > > Thanks, > > > Otto > > > > > > > > > > > > 2006/1/13, Magnus Hagander <mha@sollentuna.net>: > > > > > 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 > > > > > > > > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.371 / Virus Database: 267.14.17/228 - Release Date: > 1/12/2006 > > > ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.17/228 - Release Date: 1/12/2006