/[rserv]/misc/regress-2s.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /misc/regress-2s.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Wed Oct 29 18:17:59 2003 UTC (20 years, 6 months ago) by dpavlin
Branch: MAIN
Changes since 1.2: +4 -3 lines
File MIME type: application/x-sh
fix

1 dpavlin 1.1 # regress.sh
2     # rserv regression test script
3     # (c) 2000 Thomas Lockhart, PostgreSQL Inc.
4    
5 dpavlin 1.2 dir="`dirname $0`/../"
6 dpavlin 1.1
7     dropdb master
8     dropdb slave1
9     dropdb slave2
10    
11     createdb master || exit 1;
12     createdb slave1 || exit 1;
13     createdb slave2 || exit 1;
14    
15 dpavlin 1.2 $dir/bin/MasterInit master
16     $dir/bin/SlaveInit master slave1
17     $dir/bin/SlaveInit master slave2
18 dpavlin 1.1
19     psql -c "create table t1 (i int, t text, d timestamp default 'now');" master
20 dpavlin 1.2 $dir/bin/MasterAddTable master t1 d
21 dpavlin 1.1
22     psql -c "create table t1 (i int, t text, d timestamp default 'now');" slave1
23 dpavlin 1.2 $dir/bin/SlaveAddTable slave1 t1 d
24 dpavlin 1.1 psql -c "create table t1 (i int, t text, d timestamp default 'now');" slave2
25 dpavlin 1.2 $dir/bin/SlaveAddTable slave2 t1 d
26 dpavlin 1.1
27     psql -c "insert into t1 values (1, 'one');" master
28     psql -c "insert into t1 values (2, 'two');" master
29    
30 dpavlin 1.2 $dir/bin/Replicate master slave1
31     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave1`
32     $dir/bin/Replicate master slave2
33     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave2`
34 dpavlin 1.1
35 dpavlin 1.2 psql -c "delete from t1 where i=1;" master
36     psql -c "update t1 set t='two, updated' where i=2;" master
37 dpavlin 1.1 psql -c "insert into t1 values (3, 'three');" master
38     psql -c "insert into t1 values (4, 'four');" master
39    
40 dpavlin 1.2 $dir/bin/Replicate master slave1
41     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave1`
42     $dir/bin/Replicate master slave2
43     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave2`
44    
45     psql -c "insert into t1 values (1, 'one-insert2');" master
46     psql -c "delete from t1 where i=3;" master
47     psql -c "insert into t1 values (3, 'three-insert2');" master
48     psql -c "update t1 set t='four, updated' where i=4;" master
49    
50     $dir/bin/Replicate master slave1
51     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave1`
52     $dir/bin/Replicate master slave2
53     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave2`
54    
55 dpavlin 1.3 if [ -e "$dir/bin/../pgdiff/pgdiff" ] ; then
56     cd $dir/bin/../pgdiff
57     ./pgdiff -v master slave1
58     ./pgdiff -v master slave2
59 dpavlin 1.1 fi
60    
61     exit

  ViewVC Help
Powered by ViewVC 1.1.26