Skip to content

Commit

Permalink
20180720
Browse files Browse the repository at this point in the history
  • Loading branch information
dbacvetkov committed Jul 20, 2018
1 parent 1ebddd3 commit de9f3ab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
apply plugin: 'application'
apply plugin: 'java'

version = '0.4.0'
version = '0.4.1'
sourceCompatibility = 1.7
targetCompatibility = 1.7

Expand Down
4 changes: 3 additions & 1 deletion src/org/ash/database/ASHDatabasePG10ASH.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class ASHDatabasePG10ASH extends ASHDatabase {
+ "application_name, backend_type, "
+ "coalesce(client_hostname, client_addr::text, 'localhost') as client_hostname, "
+ "wait_event_type, wait_event, query, queryid, "
+ "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 "
+ "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 "
+ "from pg_active_session_history "
+ "where state='active' and pid != pg_backend_pid()";

Expand Down Expand Up @@ -246,6 +246,8 @@ private void loadAshDataToLocal() {
query_text = "wal";
} else if(backendType != null && (backendType.equals("walreceiver") || backendType.equals("walsender"))) {
query_text = "wal";
} else if(backendType != null && (backendType.equals("autovacuum worker"))) {
query_text = "autovacuum";
} else {
query_text = "empty";
}
Expand Down
2 changes: 1 addition & 1 deletion src/org/ash/database/DBUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ else if (s == 0) {
return "BEGIN";
} else if (array[i].equals("vacuum")) {
return "VACUUM";
} else if (array[i].equals("autovacuum:")) {
} else if (array[i].equals("autovacuum:")||array[i].equals("autovacuum")) {
return "AUTOVACUUM";
} else if (array[i].equals("analyze")) {
return "ANALYZE";
Expand Down
1 change: 0 additions & 1 deletion src/org/ash/gui/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ private void initializeBerkeleyDatabaseAndLoading() {
} else if (versionOracleDB.startsWith("10.")) {
if(ASHsupport) {
this.database = new ASHDatabasePG10ASH(this.model);
// this.database = new ASHDatabasePG10(this.model);
} else {
this.database = new ASHDatabasePG10(this.model);
}
Expand Down

0 comments on commit de9f3ab

Please sign in to comment.