PDA

View Full Version : questions about postgre



SoulRÆder
02-20-2009, 02:48 PM
I unfortunately installed postgre on C drive long time ago and now i've ran out of space due to databases, and i need to free it up for windows. How can i move them to d drive and free up the space?

There is some stuff about this on poker tracker faqs/forums about "tablespacing" or whatever, keeping the postgre folder where it is, but moving data to another drive, but thats for pt3?

please help as i need the space asap

morny
02-20-2009, 03:02 PM
Please see this FAQ http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=101

SoulRÆder
02-20-2009, 09:05 PM
Please see this FAQ http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=101

ok lookin through it great.

Another thing is i am constantly getting "posprefs.txt error 2. Try to Rewrite?" Error everytime i close HM. Hitting yes just brings the error back up again in a loop. Apparently whatever table positions for the HUD i put on are reset when then HM is restarted. Can you enlighten me?

morny
02-20-2009, 10:08 PM
try deleteing the PosPref2.txt file and restarting HM (or PosPref.txt if the error refers to that)

SoulRÆder
02-21-2009, 11:09 AM
Please see this FAQ http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=101

ok so upon trying it the way your faq recommends it, in pgAdminIII, AFTER i've reinstalled postgre 8.2.12 on a different drive (partition), and then running HM creating a new database and going into pgAdminIII and right clicking it and selecting restore and navigating to the backup of the db and hitting ok, the log window goes through its thing and at the end of it shows:

"WARNING: errors ignored on restore: 154

Process returned exit code 1."

And then OK just un-greys out again (doesn't say "done"). I've hit OK again a few times, getting the same conclusion, and each time i've hit it my new postgre folder gains like 50mb.

Please help

EDIT: and also when i go back to HM, my database is totally schewed... with 4x more hands i've ever played etc


i am using 1.08 beta 6..

SoulRÆder
02-21-2009, 11:38 AM
btw it seems to have worked for pt2 as my restored database there seems to be completely intact with the new install

morny
02-21-2009, 02:30 PM
There was an error with the backup, either back it up again or it maybe that the database is corrupt and in that case just export the hands instead of backing up the database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173 then reimport those hands into a new database

SoulRÆder
02-21-2009, 09:34 PM
There was an error with the backup, either back it up again or it maybe that the database is corrupt and in that case just export the hands instead of backing up the database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173 then reimport those hands into a new database

if i were to back it up again just wondering how would i do that? i already uninstalled postgre from its original dir where the data for it is, and HM no longer sees the original databases.

SoulRÆder
02-21-2009, 10:28 PM
also what is the difference between reimporting exported hands and restoring the database? Will my settings like on which stats to show not be brought back?

SoulRÆder
02-21-2009, 11:07 PM
for example how is it that once i've reimported the exported hands it seems to remember my database settings/filters (like under Sessions tab)? Is that normal or a by product of the original postgre dir (with the data still in it) not having been deleted yet?

morny
02-22-2009, 10:56 AM
Can you reinstall PostgreSQL on the PC where it was originally installed. Follow these instructions http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177 which will tell PostgreSQL to use the database you previously had as PostgreSQL only uninstalls the postgreSQL files but leaves the database there

Then once you do that you can export the hands from the database and then import it on the new one.

The settings are controlled from files in the Holdem Manager directory so thats why they remembered as that wasnt uninstalled only postgreSQL was

SoulRÆder
02-22-2009, 11:47 AM
Can you reinstall PostgreSQL on the PC where it was originally installed. Follow these instructions http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177 which will tell PostgreSQL to use the database you previously had as PostgreSQL only uninstalls the postgreSQL files but leaves the database there

Then once you do that you can export the hands from the database and then import it on the new one.

The settings are controlled from files in the Holdem Manager directory so thats why they remembered as that wasnt uninstalled only postgreSQL was

so then in general exporting and reimporting is a more reliable way of backing up a database than literally backing it up and restoring, because of potential errors and corrupted databases?

morny
02-22-2009, 12:03 PM
Yeah its more reliable but takes longer

SoulRÆder
02-22-2009, 12:07 PM
Yeah its more reliable but takes longer

is a corrupted db something that happens over time or usually from the get go?

morny
02-22-2009, 12:10 PM
The 2 most common causes of this problems are 1) powering off your computer or having your computer lose power while the database is doing something and 2) an old drive with bad sectors on it. Basically what happens is a small portion of a file gets slightly corrupt and then when you reboot and windows goes into that checkdsk procedure it finds the bad section and, thinking it is doing a good thing, removes it. Postgres then loads the table and a portion of it is gone so it doesn’t like that and blocks access to the entire table. Normally when this happens it is on a completely useless file that you'll never even notice is now gone and quite often it will happen to an index in the DB which can easily be rebuilt but in your case it happened to a system table.

So, to protect against this

1) keep you hands histories in case you do need to reimport
2) use a power bar and avoid hard shutdowns (when you flick the power switch on the pc)
3) if your drive is old consider replacing it with a new one. They are cheap and much faster now than even a few years ago.

SoulRÆder
02-24-2009, 01:21 PM
The 2 most common causes of this problems are 1) powering off your computer or having your computer lose power while the database is doing something and 2) an old drive with bad sectors on it. Basically what happens is a small portion of a file gets slightly corrupt and then when you reboot and windows goes into that checkdsk procedure it finds the bad section and, thinking it is doing a good thing, removes it. Postgres then loads the table and a portion of it is gone so it doesn’t like that and blocks access to the entire table. Normally when this happens it is on a completely useless file that you'll never even notice is now gone and quite often it will happen to an index in the DB which can easily be rebuilt but in your case it happened to a system table.

So, to protect against this

1) keep you hands histories in case you do need to reimport
2) use a power bar and avoid hard shutdowns (when you flick the power switch on the pc)
3) if your drive is old consider replacing it with a new one. They are cheap and much faster now than even a few years ago.

ok, thanks, that is very in-depth. I thought i had another question but i can no longer remember it.

again ty for the info

SoulRÆder
02-24-2009, 06:07 PM
Can you reinstall PostgreSQL on the PC where it was originally installed. Follow these instructions http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177 which will tell PostgreSQL to use the database you previously had as PostgreSQL only uninstalls the postgreSQL files but leaves the database there


is that guide the same for postgresql 8.2?