PDA

View Full Version : database movement to partition?



thesantini
08-17-2008, 12:12 PM
My HEM databases are running large for my partition size. What's the simplest way to either move the database to my other partition or resize the partition? Ideally, I can use a freeware program like Ranish that is executable in Windows. I beleive Ranish is boot only and I'd like to avoid something like that.

Alternatively, could I install HEM on the other HDD and would I need another code in doing so? This would allow me to export my database and then import it.

Thanks.

fabio
08-17-2008, 01:30 PM
You need to install PostgreSQL in your bigger partition.

You can either export all your handhistories in the database control panel or make a backup from your existing database. I suggest exporting your hands and re-import them later.

thesantini
08-17-2008, 04:01 PM
PostGRE is not smart. I've downloaded the install files to install on the partition with space and am trying to install said files however windows is telling me there's not enough space on the primary partition. How do I tell postgresql that I'm trying to install on the other partition?

Do you know of any freeware partition managers?

thesantini
08-17-2008, 11:38 PM
I tried to install postgres on my partition.

"the port number you entered is already in use. Please specify a different port."
What port should I use?

Thanks.

morny
08-18-2008, 06:38 AM
Is it letting you get to the part where you choose where to install the files and data folder?

Ive not heard of this problem before, try 5433

Mingmang
08-19-2008, 09:20 AM
It's really easy to move a PostgreSQL database to another drive/partition.

- stop the PostgreSQL service
- copy/move you 'data' directory to the desired location
- change the path to the data in the registry :
the key is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\pgsql-8.2\ImagePath
by default it is :
"C:\Program Files\PostgreSQL\8.2\bin\pg_ctl.exe" runservice -w -N "pgsql-8.2" -D "C:\Program Files\PostgreSQL\8.2\data\"

You need to change the -D part.

- exit the services window (where you have killed the service) or reboot
- relaunch the postgresql service

Done.

I did it yesterday, it takes 2 minutes and it works perfectly.
With this method, you can also put the data directory on an external drive, and as long as you mount it with the same keyletter, it will allow you to share your hands between 2 computers.

thesantini
08-21-2008, 03:57 PM
ming,

I just need to change the "-d" to the drive of my partition?

Mingmang
08-21-2008, 05:08 PM
ming,

I just need to change the "-d" to the drive of my partition?

yes, with the exact path of your newly copied 'data' directory

thesantini
08-21-2008, 10:57 PM
here's how to stop: PostgreSQL service

http://en.wikipedia.org/wiki/Windows_service

or this:

http://wiki.postgresql.org/wiki/Change_the_default_PGDATA_directory_on_Windows

thesantini
08-21-2008, 10:58 PM
Thanks for the help. I think this should be in the help files.

thesantini
08-25-2008, 01:40 PM
"relaunch the postgresql service"

When I do this after rebooting, it times out. The dialog from

Services (Local) times out. "The PostgreSQL Database Server 8.2 service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."

When I use HEM next will it work without a hiccup?

morny
08-25-2008, 02:23 PM
Try doing this if your getting that message again http://208.109.95.123/faq/?f=153

thesantini
08-26-2008, 12:47 AM
I uninstalled the AVG anti-virus program I'm running. I'm experiencing the same problem.

thesantini
08-26-2008, 12:49 AM
I'm running XP fwiw.

morny
08-26-2008, 06:45 AM
Have you also followed the other steps in the FAQ?

One other option is to go to C:\Program Files\PostgreSQL\8.2\data and delete the postmaster.pid file then restart holdem manager

You could also try reinstalling PostgreSQL but its best to backup if your doing this in case something goes wrong but id be sceptical whether that would fix the problem.

If that dosent work my best advise is to post on the postgreSQL forum where hopefully they can assist in getting PostgreSQL up and running again.

thesantini
08-26-2008, 11:20 AM
The only postmaster file I have is: "postmaster.opts" in the C:\Program Files\PostgreSQL\8.2\data directory.

I have viewed the FAQ directory is there something I may have overlooked in the directory?

thesantini
08-26-2008, 11:24 AM
The only postmaster file I have is: "postmaster.opts" in the C:\Program Files\PostgreSQL\8.2\data directory.

I have viewed the FAQ directory is there something I may have overlooked in the directory?

morny
08-26-2008, 12:36 PM
If theres no postmaster file then thats fine, sometimes when this file is here it locks the database and deleting it fixes the problem.