/[slony-test]/adsl/04_test_replication.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

Contents of /adsl/04_test_replication.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Sun Feb 11 21:52:48 2007 UTC (17 years, 2 months ago) by dpavlin
File MIME type: application/x-sh
File size: 801 byte(s)
initial import

1 echo "** before new data **"
2
3 psql="sudo -u postgres psql adsl"
4 $psql -p 5001 -c 'select * from po_mjesecima'
5 $psql -p 5002 -c 'select * from po_mjesecima'
6
7 echo "** insert new data in master **"
8
9 dir=/home/dpavlin/private/adsl
10 $dir/fix_date.pl $dir/200608.txt | $psql -p 5001 -c 'copy spajanja (start_t,stop_t,download,upload,duration,ip) from stdin;'
11
12 echo "** after new data **"
13
14 master="`$psql -p 5001 -c 'select * from po_mjesecima'`"
15 echo -e "## MASTER\n$master"
16 slave=''
17 while [ "$master" != "$slave" ] ; do
18 slave="`$psql -p 5002 -c 'select * from po_mjesecima'`"
19 echo -e "!! SLAVE\n$slave"
20 sleep 2
21 done
22
23 echo "** OK **"
24
25 echo "** following SHOULD RETURN ERROR! **"
26 $dir/fix_date.pl $dir/200609.txt | $psql -p 5002 -c 'copy spajanja (start_t,stop_t,download,upload,duration,ip) from stdin;'

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26