]> granicus.if.org Git - pgbadger/commitdiff
Associate autovacuum and autoanalyze log entry to the corresponding database name...
authorDarold Gilles <gilles@darold.net>
Thu, 14 Nov 2013 18:31:49 +0000 (19:31 +0100)
committerDarold Gilles <gilles@darold.net>
Thu, 14 Nov 2013 18:31:49 +0000 (19:31 +0100)
pgbadger

index 57095541ae3dd0af1ba3c6cffd9e3c20dc7897fd..43115feae2d48b9898c5579f1ffe904288f6c443 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -7049,6 +7049,12 @@ sub validate_log_line
 {
        my ($t_pid) = @_;
 
+       # Look at particular cas of vacuum/analyze that have the database
+       # name inside the log message so that they could be associated
+       if ($prefix_vars{'t_query'} =~ / of table "([^\.]+)\.[^\.]+\.[^\.]+":/) {
+               $prefix_vars{'t_dbname'}  = $1;
+       }
+
        # Check user and/or database if require
        if ($#dbname >= 0) {