Invalid Page Header Error in Reports

PokerTracker 4 version 4.0.x
October 25, 2013
PokerTracker 4
  • Overview

    There are many different kinds of errors, but one of the scariest is when your data disappears and is replaced by strings of red text.  A very common issue is the Invalid Page Head error, which can look something like this:

    Poker Tracker 4 Error

    This error can be identified by looking at the entire error string.  For instance, here is the error string from the image above:

    Error updating database: PokerTracker 4 Database
    Unable to execute query: INSERT INTO temp_cash_hand_player_statistics (SELECT id_hand, id_gametype, id_player, id_player_real, id_holecard, id_limit, id_session, date_played, "position", cnt_players, cnt_players, cnt_p_raise, flg_p_first_raise, cnt_p_call, flg_p_limp, flg_p_fold, flg_p_ccall, cnt_p_face_limpers, flg_vpip, flg_f_bet, cnt_f_raise, flg_f_first_raise, cnt_f_call, flg_f_check, flg_f_check_raise, flg_f_fold, flg_f_saw, flg_t_bet, cnt_t_raise, flg_t_first_raise, cnt_t_call, flg_t_check, flg_t_check_raise, flg_t_fold, flg_t_saw, flg_r_bet, cnt_r_raise, flg_r_first_raise, cnt_r_call, flg_r_check, flg_r_check_raise, flg_r_fold, flg_r_saw, enum_allin, enum_face_allin, enum_face_allin_action, flg_blind_s, flg_blind_b, flg_blind_ds, flg_blind_db, flg_sb_steal_fold, flg_bb_steal_fold, flg_blind_def_opp, flg_steal_att, flg_steal_opp, flg_blind_k, flg_showdown, flg_won_hand, amt_won, amt_expected_won, val_equity, id_final_hand, id_final_hand_lo, flg_showed, enum_folded, flg_p_face_raise, flg_p_3bet, flg_p_3bet_opp, flg_p_3bet_def_opp, enum_p_3bet_action, flg_p_4bet, flg_p_4bet_opp, flg_p_4bet_def_opp, enum_p_4bet_action, flg_p_squeeze, flg_p_squeeze_opp, flg_p_squeeze_def_opp, enum_p_squeeze_action, flg_f_face_raise, flg_f_3bet, flg_f_3bet_opp, flg_f_3bet_def_opp, enum_f_3bet_action, flg_f_4bet, flg_f_4bet_opp, flg_f_4bet_def_opp, enum_f_4bet_action, flg_f_cbet, flg_f_cbet_opp, flg_f_cbet_def_opp, enum_f_cbet_action, flg_t_face_raise, flg_t_3bet, flg_t_3bet_opp, flg_t_3bet_def_opp, enum_t_3bet_action, flg_t_4bet, flg_t_4bet_opp, flg_t_4bet_def_opp, enum_t_4bet_action, flg_t_cbet, flg_t_cbet_opp, flg_t_cbet_def_opp, enum_t_cbet_action, flg_t_float, flg_t_float_opp, flg_t_float_def_opp, enum_t_float_action, flg_t_donk, flg_t_donk_opp, flg_t_donk_def_opp, enum_t_donk_action, flg_r_face_raise, flg_r_3bet, flg_r_3bet_opp, flg_r_3bet_def_opp, enum_r_3bet_action, flg_r_4bet, flg_r_4bet_opp, flg_r_4bet_def_opp, enum_r_4bet_action, flg_r_cbet, flg_r_cbet_opp, flg_r_cbet_def_opp, enum_r_cbet_action, flg_r_float, flg_r_float_opp, flg_r_float_def_opp, enum_r_float_action, flg_r_donk, flg_r_donk_opp, flg_r_donk_def_opp, enum_r_donk_action, val_curr_conv FROM cash_hand_player_statistics );; Reason: Fatal Error (ERROR: invalid page header in block 8671 of relation "cash_hand_player_statistics" )

    The most important element of the error string is the reason.  In the above example, the reason is:

    Reason: Fatal Error (ERROR: invalid page header in block xxxx of relation "xxxxx" )

    There are two likely happenings for the invalid page header error.  Either there has been some corruption to the database, or you have some faulty hardware.  Read below to troubleshoot both.

  • Database Corruption

    It is possible that your data was corrupted from a computer crash.  You can easily fix this by reindexing your PokerTracker 4 database and rebuilding the cache.  Simply go to Database -> Database Management from the main menu.  Select the problematic database, and then click Rebuild Cache. This process will Reindex the database, vacuum and analyze the database, and then rebuild the database cache.  

    Reindexing Poker Tracker 4 Error

    (Note: For bigger databases, this process could take some time.  Please be patient and let the process finish to ensure optimal results)

    • Reimporting Your Database

      You also have the option to recreate the database by starting a new PokerTracker 4 database and reimporting your hands.  This process may be a burden for some users, so it is suggested that you try to reindex the database first.

  • Faulty Hardware

    Another possibility for this error is a result of faulty hardware.  You can set PostgreSQL to ignore these errors by following the advice in the PostgreSQL Troubleshooting Guide.

    IMPORTANT: If you continue to have problems with your hard drive, you should consider replacing it with a new 7200 RPM or faster speed hard drive or SSD.