/[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

Annotation of /adsl/04_test_replication.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (hide annotations)
Tue Feb 13 12:05:42 2007 UTC (17 years, 4 months ago) by dpavlin
File MIME type: application/x-sh
File size: 736 byte(s)
use data from local data directory

1 dpavlin 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 dpavlin 7 $psql -p 5001 -c 'copy spajanja (start_t,stop_t,download,upload,duration,ip) from stdin;' < data/200608.txt
10 dpavlin 1
11     echo "** after new data **"
12    
13     master="`$psql -p 5001 -c 'select * from po_mjesecima'`"
14     echo -e "## MASTER\n$master"
15     slave=''
16     while [ "$master" != "$slave" ] ; do
17     slave="`$psql -p 5002 -c 'select * from po_mjesecima'`"
18     echo -e "!! SLAVE\n$slave"
19     sleep 2
20     done
21    
22     echo "** OK **"
23    
24     echo "** following SHOULD RETURN ERROR! **"
25 dpavlin 7 $psql -p 5002 -c 'copy spajanja (start_t,stop_t,download,upload,duration,ip) from stdin;' < data/200609.txt

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26