lib/pghero/methods/maintenance.rb in pghero-2.0.8 vs lib/pghero/methods/maintenance.rb in pghero-2.1.0
- old
+ new
@@ -31,9 +31,25 @@
def autovacuum_danger
max_value = select_one("SHOW autovacuum_freeze_max_age").to_i
transaction_id_danger(threshold: 2000000, max_value: max_value)
end
+ def vacuum_progress
+ if server_version_num >= 90600
+ select_all <<-SQL
+ SELECT
+ pid,
+ phase
+ FROM
+ pg_stat_progress_vacuum
+ WHERE
+ datname = current_database()
+ SQL
+ else
+ []
+ end
+ end
+
def maintenance_info
select_all <<-SQL
SELECT
schemaname AS schema,
relname AS table,