Review of Synchronous Replication patches

From: "Kolb, Harald (NSN - DE/Munich)" <harald(dot)kolb(at)nsn(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Review of Synchronous Replication patches
Date: 2010-08-03 17:50:32
Message-ID: 0A24C3E434FAE8478BA72FEE30ACD27402C1A671@DEMUEXC005.nsn-intra.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 ?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2010-08-03 17:54:39 Re: Status report on writeable CTEs
Previous Message Kevin Grittner 2010-08-03 17:50:23 Re: [COMMITTERS] pgsql: Add \conninfo command to psql, to show current connection info.