Housekeeping error.

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Housekeeping error.

Postby Blackbay » Mon Jun 14, 2010 3:40 pm

I keep getting tis error when I do a housekeeping, I have only provided the start and the end of the error message because its 10 pages long.


There were errors during the housekeeping process:
Unable to prepare query: INSERT INTO tourney_holdem_cache SELECT tourney_holdem_hand_player_statistics.id_player, tourney_holdem_hand_player_statistics.id_blinds, tourney_holdem_hand_summary.cnt_players, ((case when( lookup_positions.flg_blinds) then 0 else (case when( lookup_positions.flg_ep) then 1 else (case when( lookup_positions.flg_mp) then 2 else 3 end) end) end)),
(sum( (CASE WHEN ( (tourney_holdem_blinds.amt_bb *tourney_holdem_blinds.val_nlpl_mult)) 0 THEN ((tourney_holdem_hand_player_statistics.amt_won * 1.0 )/( (tourney_holdem_blinds.amt_bb *tourney_holdem_blinds.val_nlpl_mult))) ELSE 0 END) )),
(sum(tourney_holdem_hand_player_detail.amt_blind)),
(sum(tourney_holdem_hand_player_statistics.amt_won)),
(sum( (case when(tourney_holdem_hand_player_statistics.flg_blind_b and tourney_holdem_hand_player_statistics.flg_blind_s = false) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_blind_b AND tourney_holdem_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action LIKE 'C') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_bb_steal_fold) then 1 else 0 end))),
(sum((case when( tourney_holdem_hand_player_statistics.flg_blind_b AND tourney_holdem_hand_player_statistics.flg_blind_def_opp AND tourney_holdem_hand_player_statistics.cnt_p_raise > 0) then 1 else 0 end))),
(sum( (case when(tourney_holdem_hand_player_statistics.flg_blind_b OR tourney_holdem_hand_player_statistics.flg_blind_s) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_3bet) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_3bet_action='C') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_3bet_action='F') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_3bet_action='R') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_3bet_def_opp) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_3bet_opp) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_4bet) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_4bet_action='C') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_4bet_action='F') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_4bet_action='R') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_4bet_def_opp) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_4bet_opp) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_bet) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_detail.amt_f_bet_facing > 0 AND (lookup_actions_f.action SIMILAR TO '(C|XC)%')) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_detail.amt_f_bet_facing > 0 AND (lookup_actions_f.action SIMILAR TO '(F|XF)%')) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_detail.amt_f_bet_facing > 0 AND (lookup_actions_f.action SIMILAR TO '(R|XR)%')) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_detail.amt_f_bet_facing > 0) then 1 else 0 end))),
(sum((case when( (tourney_holdem_hand_player_statistics.flg_f_bet OR tourney_holdem_hand_player_statistics.cnt_f_raise > 0)) then 1 else 0 end))),
(sum(tourney_holdem_hand_player_statistics.cnt_f_call)),
(sum((case when(tourney_holdem_hand_player_statistics.cnt_f_call > 0) then 1 else 0 end))),

.........

tourney_holdem_hand_player_detail.amt_ante)) 20)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_vpip and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 5)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_vpip and (tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 10)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and (tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) > 50) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 20)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 5)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and (tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 50) ) then 1 else 0 end))), (sum( (case when(tourney_holdem_hand_player_statistics.flg_showdown AND tourney_holdem_hand_player_statistics.flg_won_hand and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 20)) ) then 1 else 0 end))), (sum( (case when(tourney_holdem_hand_player_statistics.flg_showdown AND tourney_holdem_hand_player_statistics.flg_won_hand and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 5)) ) then 1 else 0 end))), (sum( (case when(tourney_holdem_hand_player_statistics.flg_showdown AND tourney_holdem_hand_player_statistics.flg_won_hand and (tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 10)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 10)) ) then 1 else 0 end))), ( (CASE WHEN ( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end)))) 0 THEN ((100 * (sum((case when(tourney_holdem_hand_player_statistics.flg_p_fold) then 1 else 0 end))) * 1.0 )/( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))))) ELSE 0 END) ), (( (CASE WHEN ( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end)))) 0 THEN (((sum((case when(tourney_holdem_hand_player_statistics.cnt_p_raise > 0) then 1 else 0 end))) * 1.0 )/( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))))) ELSE 0 END) ) * 100), (CASE WHEN ( ((sum(tourney_holdem_hand_player_statistics.cnt_f_call)) + (sum(tourney_holdem_hand_player_statistics.cnt_t_call)) + (sum(tourney_holdem_hand_player_statistics.cnt_r_call)))) 0 THEN (( ((sum((case when(tourney_holdem_hand_player_statistics.flg_f_bet) then 1 else 0 end))) + (sum(tourney_holdem_hand_player_statistics.cnt_f_raise)) + (sum((case when(tourney_holdem_hand_player_statistics.flg_t_bet) then 1 else 0 end))) + (sum(tourney_holdem_hand_player_statistics.cnt_t_raise)) + (sum((case when(tourney_holdem_hand_player_statistics.flg_r_bet) then 1 else 0 end))) + (sum(tourney_holdem_hand_player_statistics.cnt_r_raise))) * 1.0 )/( ((sum(tourney_holdem_hand_player_statistics.cnt_f_call)) + (sum(tourney_holdem_hand_player_statistics.cnt_t_call)) + (sum(tourney_holdem_hand_player_statistics.cnt_r_call))))) ELSE 0 END) , (( (CASE WHEN ( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end)))) 0 THEN (((sum((case when(tourney_holdem_hand_player_statistics.flg_vpip) then 1 else 0 end))) * 1.0 )/( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))))) ELSE 0 END) ) * 100), (( (CASE WHEN ( (sum((case when(tourney_holdem_hand_player_statistics.flg_f_saw) then 1 else 0 end)))) 0 THEN (((sum((case when(tourney_holdem_hand_player_statistics.flg_showdown) then 1 else 0 end))) * 1.0 )/( (sum((case when(tourney_holdem_hand_player_statistics.flg_f_saw) then 1 else 0 end))))) ELSE 0 END) ) * 100), (CASE WHEN ( (((sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))) * 1.0 )/( 100)) FROM tourney_holdem_summary)) ELSE 0 END) ,LEFT OUTER JOIN tourney_holdem_hand_player_combinations ON tourney_holdem_hand_player_statistics.id_hand = tourney_holdem_hand_player_combinations.id_hand AND tourney_holdem_hand_player_statistics.id_player = tourney_holdem_hand_player_combinations.id_player AND (tourney_holdem_summary.id_tourney = tourney_holdem_hand_player_statistics.id_tourney){FILTERREQ:tourney_holdem_summary} AND ((tourney_holdem_hand_player_statistics.id_hand > 8692)) AND ((tourney_holdem_hand_player_statistics.id_player = 21374)) GROUP BY tourney_holdem_hand_player_statistics.id_player, tourney_holdem_hand_player_statistics.id_blinds, tourney_holdem_hand_summary.cnt_players, ((case when( lookup_positions.flg_blinds) then 0 else (case when( lookup_positions.flg_ep) then 1 else (case when( lookup_positions.flg_mp) then 2 else 3 end) end) end)) ; Reason: Fatal Error (ERROR: syntax error at or near "FROM" LINE 1: ..._hand > 0) then 1 else 0 end))) * 1.0 )/( 100)) FROM tourn... ^ )
Blackbay
 
Posts: 4
Joined: Sun May 02, 2010 3:48 pm

Re: Housekeeping error.

Postby kraada » Mon Jun 14, 2010 3:52 pm

What version of PT3 are you currently using? Is this running an Update or a Rebuild?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Housekeeping error.

Postby Mike_D » Wed Jun 16, 2010 12:06 pm

Have the same sh-t... Recieve similar message after regular housekeeping..
What to do?
Mike_D
 
Posts: 1
Joined: Sun Aug 02, 2009 1:41 pm

Re: Housekeeping error.

Postby kraada » Wed Jun 16, 2010 12:35 pm

kraada wrote:What version of PT3 are you currently using? Is this running an Update or a Rebuild?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Housekeeping error.

Postby tommycee2 » Sat Jun 19, 2010 9:50 pm

Rather than start a new thread, I am adding to this one since my issue is nearly identical.

I loaded PT3 3.07.1beta today. I am using Postgre 8.4. I ran housekeeping after loading the beta. I received a huge list of errors after housekeeping. When I restarted the program I received the same results. I restarted the computer with the same results. I ran housekeeping again including reindex and rebuild cache. Same huge list of errors.

As far as symptoms go, the HUD is not functioning properly. It only displays history on a few players and the number of hands never change. The hand histories appear to be importing properly.

What is my next step?
tommycee2
 
Posts: 18
Joined: Thu Nov 27, 2008 7:05 am

Re: Housekeeping error.

Postby WhiteRider » Sun Jun 20, 2010 5:30 am

We've found a setting in PostgreSQL 8.4 which should speed up some slow queries.
Please try this:

Edit the postgresql.conf file (Start > Programs > PostgreSQL 8.4 > Configuration Files > postgresql.conf) - if you're using Vista or Win 7 then right click > Run As Administrator in order to be able to save the file.

On Mac the files are in /Library/PostgreSQL/8.4/data (note: not ~/library) and you can edit them with any text editor. If you don't have permission see this page.
Mac Files and Folders

Find "from_collapse_limit" and "join_collapse_limit" and set them both to 12. You must REMOVE the # from the start of the lines, like this:
from_collapse_limit = 12
join_collapse_limit = 12


Save the file and then Start > Programs > PostgreSQL > Reload Configuration (on Mac: Applications > PostgreSQL 8.4 > Restart Server).

That should help performance.
(this will be done automatically in the next release)

---

However, it doesn't sound like that will help your housekeeping issue.
Please enable logging and restart PT3 then run housekeeping again and when it finishes attach the PokerTracker.log file to a Support ticket so that we can investigate.
Tutorial: Submitting a Bug Report
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Housekeeping error.

Postby tommycee2 » Sun Jun 20, 2010 7:13 pm

Thank you WhiteRider.

I made the changes to the PostgreSQL configuration file, but it did not affect the housekeeping errors.

A support ticket has been generated. I attached .log files from both PT3 and Postgres. I will try to post the solutions to help others with this problem.
tommycee2
 
Posts: 18
Joined: Thu Nov 27, 2008 7:05 am

Re: Housekeeping error.

Postby tommycee2 » Sun Jul 04, 2010 8:00 pm

I have finally regained control over the housekeeping errors that were affecting PT 3 and my HUD. I believe the HUD was functioning poorly because the cache could not be updated.

There were a number of variables in the stats that were repeated using slightly different wording, for example BB instead of bb. After each failed housekeeping it would return a FATAL ERROR listing one of these duplicates at the end of the large list. Eventually I found eight of these problems. After the duplicates were removed by using "configure stats", the database was able to update and housekeeping ran without error. It is all good once again.
tommycee2
 
Posts: 18
Joined: Thu Nov 27, 2008 7:05 am

Re: Housekeeping error.

Postby kraada » Mon Jul 05, 2010 8:46 am

Thanks for the update.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests