PDA

View Full Version : Importing from stored HH from a friend



shalesey
11-08-2008, 09:50 PM
I have a load of hand histories from a friend of mine. They were working fine but last few days every hand gets an import error. I've updated to the beta 1.06.04 and it makes no difference.

The hands are from Full Tilt. I checked the HH files to check the HH looks fine. They look ok to me.

fabio
11-08-2008, 09:51 PM
Does it work when you create a new database?

shalesey
11-08-2008, 09:54 PM
Yeah works fine in a new database. The old database is a backup and restore from a different hard drive. I also have no errors importing from the temp file full tilt creates in the Handhistory folder. Suggestions with the database?

shalesey
11-08-2008, 10:00 PM
BTW I don't fancy exporting all the hands from the old db to the new as I have over 2.5 million in there.

morny
11-08-2008, 10:09 PM
Unfortunately the reimport looks likely, im no PostgreSQL expert but maybe if you check the Data\pg_log folder and look for the log file thats recent i.e Today and see if its showing any errors in there relating to any of the indexes and if so repair them following instructions from this FAQ http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=168

shalesey
11-08-2008, 10:16 PM
Unfortunately the reimport looks likely, im no PostgreSQL expert but maybe if you check the Data\pg_log folder and look for the log file thats recent i.e Today and see if its showing any errors in there relating to any of the indexes and if so repair them following instructions from this FAQ http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=168

Ok I have this, which index do I need to fix? I started Vacumm analysing the DB so i'll see if that helps.

2008-11-09 01:50:39 GMT ERROR: current transaction is aborted, commands ignored until end of transaction block
2008-11-09 01:50:39 GMT STATEMENT: SAVEPOINT beforegame;
2008-11-09 01:50:42 GMT ERROR: duplicate key value violates unique constraint "uniqueserial"
2008-11-09 01:50:42 GMT STATEMENT: EXECUTE PKHEXECUTE(8839881668,1,to_timestamp('11/06/2008 14:05:31','MM/DD/YYYY HH24:MI:SS'),70,1,2,2,2,2,2,1,30,37,4,22,46,345,15 ,360,360,360,360,32,32,32,2,2,False,2,0,0,0,11,11, 11,-1,0,-1,0); select currval('pokerhands_pokerhand_id_seq')
2008-11-09 01:50:42 GMT ERROR: duplicate key value violates unique constraint "uniqueserial"
2008-11-09 01:50:42 GMT STATEMENT: EXECUTE PKHEXECUTE(8839885431,1,to_timestamp('11/06/2008 14:05:50','MM/DD/YYYY HH24:MI:SS'),70,1,2,0,0,0,0,2,0,0,0,0,0,395,0,0,0, 0,0,-1,-1,-1,-1,-1,False,-1,0,0,0,-1,-1,-1,0,1,-1,0); select currval('pokerhands_pokerhand_id_seq')
2008-11-09 01:50:42 GMT ERROR: duplicate key value violates unique constraint "uniqueserial"
2008-11-09 01:50:42 GMT STATEMENT: EXECUTE PKHEXECUTE(8839889116,1,to_timestamp('11/06/2008 14:06:06','MM/DD/YYYY

morny
11-08-2008, 10:24 PM
Try the 4 Pokerhands_xxx and see if they help or maybe the vacuum might mention something too

Let me know if it works as this might be useful to other people with the same problem

shalesey
11-08-2008, 10:31 PM
Try the 4 Pokerhands_xxx and see if they help or maybe the vacuum might mention something too

Let me know if it works as this might be useful to other people with the same problem

Ok i scoured the Postgre sql log for any index names and fixed all those.

I fixed the 4 indexs you suggested.

I vacuum nalysed the db.

Still getting the errors. Ideas?

shalesey
11-08-2008, 10:44 PM
OK new problem, I try export all the hands but there isn't enough space on my hard drive. Any way to choose where I export them to? I have like 5 hard drives.

shalesey
11-08-2008, 11:01 PM
Scratch that, I managed to clear up some space. Managed to export them all. It recons 9 hours left of the import so i'm going to bed.

I hope this works guys.

morny
11-09-2008, 10:18 AM
Yeah when it goes like this a new database is usually the best solution as you did however since you were understandably not to keen because of the size of the database it was worth a try

Once you have the exported hands youll be fine

shalesey
11-09-2008, 10:59 AM
Ok the restore worked and I can now import hands. However I really don't fancy doing this again if it messes up again.

Do you guys have any idea why this happens?

morny
11-09-2008, 11:38 AM
The 2 most common causes of this problems with corrupt databases 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.

shalesey
11-09-2008, 12:41 PM
Yeah my PC had an overheating issue recentley since I fitted a new power supply. For some reason it gets really hot. So it just kept cutting out.

I fitted an exhaust fan inside one of the CD drive bays last night and it hasn't cut out yet.

I have a quad core, 1000w PSU, 8800 GTX and 4Gb RAM and 4 physical hard drives. So that's why it was probably ver heating.

So one of the cut outs may have killed the db.