PDA

View Full Version : can't start PostgreSQL service after moving data to second hard drive



Russelldust
10-22-2011, 10:03 AM
My C drive filled up [edit: actually my D drive], so I carefully followed the instructions here (http://faq.holdemmanager.com/questions/368/Move+Database+to+Another+Hard+Drive+or+Partition) to move my PostgreSQL data folder (all 18 Gig of it) to a second hard disk.

PostgreSQL is installed in "D:\Program Files (x86)\PostgreSQL\8.3\"
And now my data folder is "P:\Program Files (x86)\PostgreSQL\8.3\data"

I did everything in the instructions, including changing the ImagePath registry entry to:

"D:\Program Files (x86)\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N "pgsql-8.3" -D "P:\Program Files (x86)\PostgreSQL\8.3\data\"

I also checked the permissions for the newly created data folder. Full Control is granted to everyone.

But having done all this (and rebooted) I now can't get the database service to start up. :(

When I 'Start service', the command-prompt window pops up as usual, but the service never starts:

The PostgreSQL Database Server 8.3 service is starting..........................

How can I find out what's going wrong?

Sarek
10-22-2011, 01:08 PM
set Windows to show all files including hidden and system
How to see hidden files in Windows (http://www.bleepingcomputer.com/tutorials/tutorial62.html)
- It should look like this: http://rvgsoftware.fileburst.com/images/hidden.jpg

delete the ...\data\postmaster.pid file, if you see it.
and postmaster.opts
Do not delete any other files
Then reboot PC

Russelldust
10-22-2011, 01:48 PM
Thanks for the suggestion - didn't make any difference though.

I've noticed that nothing is being written to the pg_log folder.
I've check that it's not a firewall issue (and besides, everything worked just fine before I moved the data folder).

Any other ideas?

Russelldust
10-22-2011, 04:23 PM
Ok I think it was a file permissions thing after all. I re-applied the access permissions so that literally everyone can access the new Program Files folder and everything beneath, and now the service works fine.

Sorry for my oversight, and thanks for the advice. :cool: