]> git.evergreen-ils.org Git - Evergreen.git/blob - Evergreen/src/extras/import/sparkle.subscribe-fw5.slonik
replication and load balancing srcripts
[Evergreen.git] / Evergreen / src / extras / import / sparkle.subscribe-fw5.slonik
1 #!/bin/sh
2
3 CLUSTER=prod_replica_set
4 DBNAME=sparkle
5 MASTERHOST=10.1.0.13
6 SLAVEHOST=10.1.0.14
7 STATSHOST=10.1.0.11
8 PGUSER=postgres
9 BINDIR=/opt/pg814/bin
10
11 $BINDIR/slonik <<_EOF_
12
13         #--
14         # define the namespace the replication system uses in our example it is
15         # slony_example
16         #--
17
18         cluster name = $CLUSTER;
19
20         #--
21         # admin conninfo's are used by slonik to connect to the nodes one for each
22         # node on each side of the cluster, the syntax is that of PQconnectdb in
23         # the C-API
24         # --
25
26         node 1 admin conninfo = 'dbname=$DBNAME host=$MASTERHOST user=$PGUSER';
27         node 2 admin conninfo = 'dbname=$DBNAME host=$SLAVEHOST user=$PGUSER';
28
29         subscribe set ( id = 1, provider = 1, receiver = 2, forward = yes);
30 _EOF_