+\c postgres
+SELECT bdr.bdr_part_by_node_names(ARRAY['node-pg']);
+ bdr_part_by_node_names
+------------------------
+
+(1 row)
+
+SELECT pg_xlog_wait_remote_apply(pg_current_xlog_location(), 0);
+ pg_xlog_wait_remote_apply
+---------------------------
+
+(1 row)
+
+\c regression
+-- There should now be zero slots
+SELECT plugin, slot_type, database, active FROM pg_replication_slots;
+ plugin | slot_type | database | active
+--------+-----------+------------+--------
+ bdr | logical | postgres | f
+ bdr | logical | regression | f
+(2 rows)
+
+-- Zero active connections
+SELECT count(*) FROM pg_stat_replication;
+ count
+-------
+ 0
+(1 row)
+
+-- and the node state for the removed node should show 'k'
+SELECT node_name, node_status FROM bdr.bdr_nodes;
+ node_name | node_status
+-----------------+-------------
+ node-regression | r
+ node-pg | k
+(2 rows)
+
+\c postgres
+-- ... on both nodes.
+SELECT node_name, node_status FROM bdr.bdr_nodes;
+ node_name | node_status
+-----------------+-------------
+ node-regression | r
+ node-pg | k
+(2 rows)
+