Skip to content

Commit de9f3ab

Browse files
committed
20180720
1 parent 1ebddd3 commit de9f3ab

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
apply plugin: 'application'
1111
apply plugin: 'java'
1212

13-
version = '0.4.0'
13+
version = '0.4.1'
1414
sourceCompatibility = 1.7
1515
targetCompatibility = 1.7
1616

src/org/ash/database/ASHDatabasePG10ASH.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class ASHDatabasePG10ASH extends ASHDatabase {
8888
+ "application_name, backend_type, "
8989
+ "coalesce(client_hostname, client_addr::text, 'localhost') as client_hostname, "
9090
+ "wait_event_type, wait_event, query, queryid, "
91-
+ "coalesce(query_start, xact_start, backend_start) as query_start, 1000 * EXTRACT(EPOCH FROM (clock_timestamp()-coalesce(query_start, xact_start, backend_start))) as duration "
91+
+ "coalesce(query_start, xact_start, backend_start) as query_start, 1000 * EXTRACT(EPOCH FROM (ash_time - coalesce(query_start, xact_start, backend_start))) as duration "
9292
+ "from pg_active_session_history "
9393
+ "where state='active' and pid != pg_backend_pid()";
9494

@@ -246,6 +246,8 @@ private void loadAshDataToLocal() {
246246
query_text = "wal";
247247
} else if(backendType != null && (backendType.equals("walreceiver") || backendType.equals("walsender"))) {
248248
query_text = "wal";
249+
} else if(backendType != null && (backendType.equals("autovacuum worker"))) {
250+
query_text = "autovacuum";
249251
} else {
250252
query_text = "empty";
251253
}

src/org/ash/database/DBUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ else if (s == 0) {
7373
return "BEGIN";
7474
} else if (array[i].equals("vacuum")) {
7575
return "VACUUM";
76-
} else if (array[i].equals("autovacuum:")) {
76+
} else if (array[i].equals("autovacuum:")||array[i].equals("autovacuum")) {
7777
return "AUTOVACUUM";
7878
} else if (array[i].equals("analyze")) {
7979
return "ANALYZE";

src/org/ash/gui/MainFrame.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ private void initializeBerkeleyDatabaseAndLoading() {
341341
} else if (versionOracleDB.startsWith("10.")) {
342342
if(ASHsupport) {
343343
this.database = new ASHDatabasePG10ASH(this.model);
344-
// this.database = new ASHDatabasePG10(this.model);
345344
} else {
346345
this.database = new ASHDatabasePG10(this.model);
347346
}

0 commit comments

Comments
 (0)