lib/pghero/methods/replication.rb in pghero-2.0.1 vs lib/pghero/methods/replication.rb in pghero-2.0.2
- old
+ new
@@ -19,16 +19,20 @@
AS replication_lag
SQL
end
def replication_slots
- select_all <<-SQL
- SELECT
- slot_name,
- database,
- active
- FROM pg_replication_slots
- SQL
+ if server_version_num >= 90400
+ select_all <<-SQL
+ SELECT
+ slot_name,
+ database,
+ active
+ FROM pg_replication_slots
+ SQL
+ else
+ []
+ end
end
def replicating?
select_all("SELECT state FROM pg_stat_replication").any?
end