fixes to the banlist

This commit is contained in:
Lev Kokotov
2022-02-09 21:19:14 -08:00
parent 28c70d47b6
commit a9b2a41a9b
7 changed files with 87 additions and 10 deletions

View File

@@ -1,7 +1,12 @@
#/bin/bash
set -e
# Setup all the shards.
sudo service postgresql restart
# sudo service postgresql restart
echo "Giving Postgres 5 seconds to start up..."
# sleep 5
psql -f query_routing_setup.sql
@@ -9,4 +14,6 @@ psql -h 127.0.0.1 -p 6432 -f query_routing_test_insert.sql
psql -h 127.0.0.1 -p 6432 -f query_routing_test_select.sql
psql -e -h 127.0.0.1 -p 6432 -f query_routing_test_primary_replica.sql
psql -f query_routing_test_validate.sql

View File

@@ -0,0 +1,13 @@
SET SERVER ROLE TO 'primary';
SELECT 1;
SET SERVER ROLE TO 'replica';
SELECT 1;
SET SHARDING KEY TO '1234';
SET SERVER ROLE TO 'primary';
SELECT 1;
SET SERVER ROLE TO 'replica';
SET SHARDING KEY TO '4321';
SELECT 1;