PDA

View Full Version : pgSQL errors while trying to backup and vacuum



Josey Wales
01-27-2010, 05:02 AM
I'm running HM 1.10.1. After trying to backup my db trough pgAdmin III, I got

pg_dump: dumping contents of table actiontypes
pg_dump: dumping contents of table aliases
pg_dump: dumping contents of table allinsituations
pg_dump: dumping contents of table allinsituations_hero
pg_dump: dumping contents of table bonuses
pg_dump: dumping contents of table compiledplayerresults
pg_dump: dumping contents of table compiledplayerresults_month
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: invalid page header in block 32299 of relation "compiledplayerresults_month"
pg_dump: The command was: COPY public.compiledplayerresults_month (compiledplayerresults_id, totalhands, totalamountwon, totalrake, totalbbswon, vpiphands, pfrhands, couldcoldcall, didcoldcall, couldthreebet, didthreebet, couldsqueeze, didsqueeze, facingtwopreflopraisers, calledtwopreflopraisers, raisedtwopreflopraisers, smallblindstealattempted, smallblindstealdefended, smallblindstealreraised, bigblindstealattempted, bigblindstealdefended, bigblindstealreraised, sawnonsmallshowdown, wonnonsmallshowdown, sawlargeshowdown, wonlargeshowdown, sawnonsmallshowdownlimpedflop, wonnonsmallshowdownlimpedflop, sawlargeshowdownlimpedflop, wonlargeshowdownlimpedflop, wonhand, wonhandwhensawflop, wonhandwhensawturn, wonhandwhensawriver, facedthreebetpreflop, foldedtothreebetpreflop, calledthreebetpreflop, raisedthreebetpreflop, facedfourbetpreflop, foldedtofourbetpreflop, calledfourbetpreflop, raisedfourbetpreflop, bigbetpreflopsawshowdown, bigbetflopsawshowdown, bigbetturnsawshowdown, bigbetriversawshowdown, bigcallpreflopsawshowdown, bigcallflopsawshowdown, bigcallturnsawshowdown, bigcallriversawshowdown, bigbetpreflopwonshowdown, bigbetflopwonshowdown, bigbetturnwonshowdown, bigbetriverwonshowdown, bigcallpreflopwonshowdown, bigcallflopwonshowdown, bigcallturnwonshowdown, bigcallriverwonshowdown, turnfoldippassonflopcb, turncallippassonflopcb, turnraiseippassonflopcb, riverfoldippassonturncb, rivercallippassonturncb, riverraiseippassonturncb, sawflop, sawshowdown, wonshowdown, totalbets, totalcalls, flopcontinuationbetpossible, flopcontinuationbetmade, turncontinuationbetpossible, turncontinuationbetmade, rivercontinuationbetpossible, rivercontinuationbetmade, facingflopcontinuationbet, foldedtoflopcontinuationbet, calledflopcontinuationbet, raisedflopcontinuationbet, facingturncontinuationbet, foldedtoturncontinuationbet, calledturncontinuationbet, raisedturncontinuationbet, facingrivercontinuationbet, foldedtorivercontinuationbet, calledrivercontinuationbet, raisedrivercontinuationbet, totalpostflopstreetsseen, totalaggressivepostflopstreetsseen, vs_ep_raise_ip_fold, vs_ep_raise_ip_call, vs_ep_raise_ip_raise, vs_mp_raise_ip_fold, vs_mp_raise_ip_call, vs_mp_raise_ip_raise, vs_co_raise_ip_fold, vs_co_raise_ip_call, vs_co_raise_ip_raise, vs_sb_raise_ip_fold, vs_sb_raise_ip_call, vs_sb_raise_ip_raise, vs_ep_raise_oop_fold, vs_ep_raise_oop_call, vs_ep_raise_oop_raise, vs_mp_raise_oop_fold, vs_mp_raise_oop_call, vs_mp_raise_oop_raise, vs_co_raise_oop_fold, vs_co_raise_oop_call, vs_co_raise_oop_raise, vs_bt_raise_oop_fold, vs_bt_raise_oop_call, vs_bt_raise_oop_raise, ep_vs_raise_ip_fold, ep_vs_raise_ip_call, ep_vs_raise_ip_raise, ep_vs_raise_oop_fold, ep_vs_raise_oop_call, ep_vs_raise_oop_raise, mp_vs_raise_ip_fold, mp_vs_raise_ip_call, mp_vs_raise_ip_raise, mp_vs_raise_oop_fold, mp_vs_raise_oop_call, mp_vs_raise_oop_raise, co_vs_raise_ip_fold, co_vs_raise_ip_call, co_vs_raise_ip_raise, co_vs_raise_oop_fold, co_vs_raise_oop_call, co_vs_raise_oop_raise, bt_vs_raise_oop_fold, bt_vs_raise_oop_call, bt_vs_raise_oop_raise, sb_vs_raise_ip_fold, sb_vs_raise_ip_call, sb_vs_raise_ip_raise) TO stdout;
pg_dump: *** aborted because of error

Process returned exit code 1.

Then I tried Vacuum, again trough pgAdmin III. I gots:

CPU 0.00s/0.00u sec elapsed 0.00 sec.INFO: analyzing "public.pokersites"INFO: "pokersites": scanned 1 of 1 pages, containing 20 live rows and 0 dead rows; 20 rows in sample, 20 estimated total rowsINFO: vacuuming "public.handhistories"
ERROR: invalid page header in block 62346 of relation "handhistories"

ERROR: invalid page header in block 62346 of relation "handhistories"

What's my play?

netsrak
01-27-2010, 07:16 AM
Your database is corrupt, create a new one and reimport all your hands.

Josey Wales
01-27-2010, 09:42 AM
Thanks.

This is gonna take forevaaa... estimated time remaining 14+ hrs :( on a SSD drive!

Josey Wales
01-28-2010, 04:51 AM
Um, this is going on for close to 24 hrs now. The green progress bar is at 1/5th of the way, this will like never end. I have a dual core 4 GHz rig with 6 GB RAM and an SSD drive (where the DB is at).

I don't get it, there's like 1.3 GB of text data to be imported, the resources being used (CPU, RAM I/O) are nowhere near peak.

Any hints?

netsrak
01-28-2010, 06:18 AM
What is the import speed?

Please try to import the files in smaller packages.

Its also possible that your SSD is damaged and you need to run a chkdsk or sth. like that before creating a new database.

Josey Wales
01-28-2010, 06:35 AM
Thought about that before, no errors on disk check, not even on DB files which were corrupt. Import speed is like 4-8 H/s, it varies form time to time.

Smaller packages is a good idea tho, thanks.

Josey Wales
01-30-2010, 05:22 AM
So, it's day 4 and we're finally done! What do I have to do so I won't go trough this ordeal ever again? I'm guessing backup and restore would be like 1245x faster, right?

edit: my tournaments are all effed up now?

netsrak
01-30-2010, 06:24 AM
Do a regular backup (at least every month) and save all your handhistories and summaries.

For your tourneys - seems like the results are missing? Is it possible that they were imported before the hands? I would try to copy them to a different folder and import them again.

Josey Wales
01-30-2010, 06:29 AM
Ugh...

1st, after I did the export hands thing, I got text files named File1 trough File448.txt. They weren't imported in their numerical ascending order, is that a problem?

2nd, I don't know how to get a hold of the tourney results, do I have to switch to the old DB and export them from there somehow?

netsrak
01-30-2010, 09:48 AM
Oh, i thought you imported the original hands. The sequence doesn't matter for the hands.

If you exported from an old database you additionally need to export the results via tourney -> results -> dataview -> select all -> right mouse key -> export Tourney results and summaries.

And when you are connected to your old database you should export your notes too :)

jenkulle
01-30-2010, 01:30 PM
had the same problem with importing hands from an old DB... I tried importing smaller 'package' but it takes foreever

is there a way like in PT3 to choose the maximum size for files to be exported or something like that ?? It would make the most sense that HEM would export files that would be the easiest to import after that...

netsrak
01-31-2010, 07:29 AM
This is not an available feature at the moment. Please suggest it or vote for it here: http://holdemmanager.uservoice.com/pages/5307-holdem-manger-suggestions