PDA

View Full Version : Stars hand import errors



MellowYellow
10-11-2011, 02:04 AM
Hi, I believe i have the most up to date version : 1.12.04

It was fine then suddenly today mid session i started getting some tables where stats were odd like VPIP would be 9999292923482308.222

then it started not working for whole tables. It would say int the import tab that a lot of errors were happening when importing but it didnt say what errors so I dont know where to look to get the error log for you guys.

This is at CAP FR and 6max. Though it doesn't look like anyone else is reporting this and I didn't update PS recently so not sure.

Sarek
10-11-2011, 04:00 AM
Please create new database and see what happens in it.
http://faq.holdemmanager.com/questions/190/Database+Management

MellowYellow
10-11-2011, 04:52 AM
Is there any other way to see an error log or anything? I ask because I just created this new database 2 or 3 days ago and it takes many hours to import my hands from just last month. If it's just going to keep happening after a few days I'm going to be wasting a lot of my playing time importing, and unfortunately I don't have a lot of free time to import with the SNE grind.

netsrak
10-11-2011, 08:26 AM
We just want you to import the problem hand into a new test database to see what happens....

MellowYellow
10-11-2011, 03:06 PM
Oh I see, my mistake.

First off when I opened HEM today I got these 3 errors right off the bat before it even opened all the way:

"An error occurred when retrieving the player list: ERROR: XX001: invalid page header in block 442 of relation base/16397/16487"

"An error occurred when retriving the imported file list: ERROR:58P01: could not open segment 1 of relation base/16397/16446 (target block 1048607): No such file or directory"

"An error occurred when retrieving the player list: ERROR: XX001: invalid page header in block 442 of relation base/16397/16487"


I imported the files that werent moved to my processed directory (I assume these are the ones that were having the errors importing that's why they were still there?) and they imported without issue.

MellowYellow
10-11-2011, 06:57 PM
So am I screwed is my db gone and i gotta start a new one again? Is there any reason why this keeps happening?

Patvs
10-11-2011, 08:54 PM
The 2 most common causes of this problem are: powering off your computer or having your computer lose power while the database is doing something; and 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 but quite often it will happen to an index in the DB which can easily be rebuilt but in your case it happened to one or more of the tables.

So, to protect against this

1 - Keep your 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.

---




Which PostgreSQL version are you using??
Run a CHKDSK/SCANDISK on your hardisk.

Install a different version to a different port number (for example 9.1 to port 5433)
Reimport your hands again.
When finished create a backup: http://faq.holdemmanager.com/questions/72/Backup%26RestoreDatabase
it will be 100 times faster restoring a backup file than it is having to reimport all the hands.

MellowYellow
10-12-2011, 03:37 AM
Is there a way to make back ups of my db periodically then? Like can I copy certain files in the Postgres/base directory or some other files so if this ever happens again i can delete the database entirely and then copy this from the different directory and instantly replace the old db and be ready to go? Like if maybe ever 3 days I copied certain db files to a seperate directory?

netsrak
10-12-2011, 04:31 AM
Thats not possible on a file basis.
You can use pgadmin to create a backup: http://faq.holdemmanager.com/questions/72/Backup+%26+Restore+Database
If you run this the script which is executed (pg_dump) is displayed and you can use this script as template for generating a backup command file which you can run periodically.