[check_postgres] nn.relname does not exist

Jeff Frost jeff at frostconsultingllc.com
Tue Jun 24 20:25:10 UTC 2008


On 8.3.3, the check_bloat query doesn't seem to work:

ERROR:  column nn.relname does not exist
LINE 47: ...space = nn.oid AND nn.nspname = rs.schemaname AND nn.relname...

I think that's just a typo and is supposed to say: nn.nspname:

diff --git a/check_postgres.pl b/check_postgres.pl
index f67c8ee..1f1b4f5 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -1390,7 +1390,7 @@ FROM (
     ) AS foo
   ) AS rs
   JOIN pg_class cc ON cc.relname = rs.tablename
-  JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname =
rs.schemaname AND nn.relname <> 'information_schema'
+  JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname =
rs.schemaname AND nn.nspname <> 'information_schema'
   LEFT JOIN pg_index i ON indrelid = cc.oid
   LEFT JOIN pg_class c2 ON c2.oid = i.indexrelid
 ) AS sml



-- 
Jeff Frost, Owner 	<jeff at frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954

-------------- next part --------------
diff --git a/check_postgres.pl b/check_postgres.pl
index f67c8ee..1f1b4f5 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -1390,7 +1390,7 @@ FROM (
     ) AS foo
   ) AS rs
   JOIN pg_class cc ON cc.relname = rs.tablename
-  JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname = rs.schemaname AND nn.relname <> 'information_schema'
+  JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname = rs.schemaname AND nn.nspname <> 'information_schema'
   LEFT JOIN pg_index i ON indrelid = cc.oid
   LEFT JOIN pg_class c2 ON c2.oid = i.indexrelid
 ) AS sml


More information about the Check_postgres mailing list