We need to update the repmgr.sql file with the new view and create a

repmgr3.0_repmgr3.1.sql for the upgrade process when passing to 3.1
This commit is contained in:
Martin
2015-12-22 13:27:42 -03:00
parent 56b9ca7992
commit 35caeaa66a
2 changed files with 42 additions and 0 deletions

View File

@@ -59,3 +59,12 @@ WHERE (standby_node, last_monitor_time) IN (SELECT standby_node, MAX(last_monito
ALTER VIEW repl_status OWNER TO repmgr;
CREATE INDEX idx_repl_status_sort ON repl_monitor(last_monitor_time, standby_node);
/*
* This view shows the list of nodes with the information of which one is the upstream
* in each case (when appliable)
*/
CREATE VIEW repl_show_nodes AS
SELECT rn.id, rn.conninfo, rn.type, rn.name, rn.cluster,
rn.priority, rn.active, sq.name AS upstream_node_name
FROM repl_nodes as rn LEFT JOIN repl_nodes AS sq ON sq.id=rn.upstream_node_id;