File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ source "${script_dir}/common.sh"
6
6
cd " ${script_dir} /.."
7
7
make clean
8
8
9
- restart_nodes
9
+ restart_nodes # make sure nodes run
10
10
for port in $master_port " ${worker_ports[@]} " ; do
11
11
psql -p $port -c " drop extension if exists pg_shardman;"
12
12
done
Original file line number Diff line number Diff line change @@ -340,10 +340,14 @@ BEGIN
340
340
EXECUTE format(' DROP SUBSCRIPTION %I' , sub .subname );
341
341
END IF;
342
342
END LOOP;
343
- FOR rs IN SELECT slot_name FROM pg_replication_slots
344
- WHERE slot_name LIKE ' shardman_%' AND slot_type = ' logical' LOOP
345
- EXECUTE format(' SELECT pg_drop_replication_slot(%L)' , rs .slot_name );
346
- END LOOP;
343
+ -- TODO: we can't just drop replication slots because
344
+ -- pg_drop_replication_slot will bail out with ERROR if connection is active.
345
+ -- We should therefore iterate over all active subscribers and turn off
346
+ -- subscriptions first.
347
+ -- FOR rs IN SELECT slot_name FROM pg_replication_slots
348
+ -- WHERE slot_name LIKE 'shardman_%' AND slot_type = 'logical' LOOP
349
+ -- EXECUTE format('SELECT pg_drop_replication_slot(%L)', rs.slot_name);
350
+ -- END LOOP;
347
351
348
352
PERFORM shardman .reset_node_id ();
349
353
END;
You can’t perform that action at this time.
0 commit comments