From: harald.kolb on
Hi,

After setting up a real SR cluster based on V9 beta3 and Fuji's SR patch
synch_rep_0722.patch
and doing some simple update_and_check tests, it seems that active and
standby are not in sync.
Can this be a problem of the SR or the HSB feature ?
Or is "fsync" still not supported ?

Used configuration:
node1# cat postgresql.conf
....
max_wal_senders = 2
wal_level = 'hot_standby'
wal_keep_segments = 10
checkpoint_segments = 10
checkpoint_timeout = 3min
hot_standby = on
quorum = 1
wal_sender_delay = 1ms # walsender cycle time, 1-10000 milliseconds

node2# cat recovery.conf
standby_mode = 'true'
#replication_mode = 'recv'
replication_mode = 'fsync'

Test script is:
node1# cat check.sh
#set -x
RC=$(./bin/psql postgres -t -h node1 -p 5432 -c "drop table test ;")
RC=$(./bin/psql postgres -t -h node1 -p 5432 -c "create table test (i
integer,d integer);")
RC=$(./bin/psql postgres -t -h node1 -p 5432 -c "insert into test values
(1,1);")
retry=1
while (true)
do
RC=$(./bin/psql postgres -t -h node1 -p 5432 -c "update test set
d=$retry where i=1;")
DATA=$(./bin/psql postgres -t -h node2 -p 5432 -c "select d from test
where i=1;")
DIFF=$(( $retry - $DATA ))
echo $retry - $DATA - $DIFF
i=$(( retry++ ))
done

Output is:
1 - 1 - 0
2 - 1 - 1
3 - 2 - 1
4 - 3 - 1
5 - 4 - 1
6 - 5 - 1
7 - 6 - 1
8 - 8 - 0
9 - 9 - 0
....

Any ideas ?

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers