PDA

View Full Version : How to move Database from C: to D:?



mike999
05-31-2009, 02:31 PM
Hi,
my database is getting to big and I want to move it from the C: drive to the D: drive. How can I do that? It would be OK for me if PostgreSQL ist still installed on C:, but the database itself should be on D:, as this partition is much larger.
Thank you for your help,
Mika

morny
05-31-2009, 04:56 PM
Heres some things to consider backing up http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=101

Id also export your hands in case anything goes wrong when restoring the database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173

So once youve your backups done, uninstall PostgreSQL and then reinstall it on the D drive, once its working then you can delete the C:/Program Files/PostgreSQL folder to free up space

mike999
06-01-2009, 04:50 PM
Thank you morny.

I did the backup, export and the unsinstall.

Then i reinstalled postgreSQL on the D: drive. When I restored the previous backup, everything seemed to run good. At the end I noticed one error that occured during the restore:
pg_restore: creating PROCEDURAL LANGUAGE plpgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 423; 2612 16386 PROCEDURAL LANGUAGE plpgsql postgres
pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql" already exists
Command was:
CREATE PROCEDURAL LANGUAGE plpgsql;
Do you think this is a problem? Can't tell yet if everything works, but I will check it tomorrow. I just wanted to know if the error message is critical.

Thanks,
Mike

morny
06-01-2009, 07:07 PM
Hard to know, check out the database, if there is a problem you should start getting errors, otherwise it should be fine.