]> granicus.if.org Git - pgbadger/commitdiff
Fix wrong timestamps saved with top queries. Thanks to Herve Werner for the report.
authorDarold Gilles <gilles@darold.net>
Sun, 1 Dec 2013 22:47:21 +0000 (23:47 +0100)
committerDarold Gilles <gilles@darold.net>
Sun, 1 Dec 2013 22:47:21 +0000 (23:47 +0100)
pgbadger

index b0515720e341d5a163666321781b17502f31ef99..e6af1b6bcadd95ef86fca62d7a84ac8476920c0b 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -7994,7 +7994,7 @@ sub store_queries
                                $normalyzed_info{$normalized}{chronos}{"$cur_day_str"}{"$cur_hour_str"}{duration} += $cur_info{$t_pid}{duration};
 
                                # Store normalized query samples
-                               &set_top_sample($normalized, $cur_info{$t_pid}{query}, $cur_info{$t_pid}{duration}, $overall_stat{'last_log_ts'},$cur_info{$t_pid}{dbname}, $cur_info{$t_pid}{dbuser}, $cur_info{$t_pid}{dbclient},$cur_info{$t_pid}{dbappname});
+                               &set_top_sample($normalized, $cur_info{$t_pid}{query}, $cur_info{$t_pid}{duration}, $cur_last_log_timestamp, $cur_info{$t_pid}{dbname}, $cur_info{$t_pid}{dbuser}, $cur_info{$t_pid}{dbclient},$cur_info{$t_pid}{dbappname});
                        }
                }
        }