[Schmitzm-commits] r1748 - trunk/schmitzm-core/src/main/java/de/schmitzm/postgres

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 3 22:47:42 CEST 2011


Author: alfonx
Date: 2011-10-03 22:47:41 +0200 (Mon, 03 Oct 2011)
New Revision: 1748

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/postgres/PGUtil.java
Log:


Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/postgres/PGUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/postgres/PGUtil.java	2011-10-03 10:15:59 UTC (rev 1747)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/postgres/PGUtil.java	2011-10-03 20:47:41 UTC (rev 1748)
@@ -635,15 +635,16 @@
 			where += " and age (now(),query_start) >= interval '" + minSecondsRunning + " second' ";
 		}
 
-		final String sql = "select current_query, age (now(),query_start) as qage from pg_stat_activity " + where
+		final String sql = "select current_query, age (now(),query_start) as qage, waiting from pg_stat_activity " + where
 				+ " order by qage desc";
 		ResultSet rs = c.createStatement().executeQuery(sql);
 
 		while (rs.next()) {
 			String q = rs.getString(1);
 			String since = rs.getString(2);
+			String waiting = rs.getString(3);
 
-			result.add(new String[] {q, since});
+			result.add(new String[] {q, since, waiting});
 		}
 
 		return result;



More information about the Schmitzm-commits mailing list