Philip Yarra philip
Fri Dec 23 06:37:52 PST 2005
OK, having got the compile to work right, it installs and seems to work (for 
some small tests with our replicated DB). Next step was to run the slony 
tests. I ran into a few issues:

==> the -t switch to mktemp was added in v1.5, but RHEL3.0 has v1.4, so its 
use in run_test.sh fails. I suggest we change the following in run_test.sh:
  Linux)
    mktmp=`mktemp -d -t slony-regress.XXXXXX`
to:
  Linux)
    if [ $OLDMKTEMP ]; then
        mktmp=`mktemp -d /tmp/slony-regress.XXXXXX`
    else
        mktmp=`mktemp -d -t slony-regress.XXXXXX`
    fi

I was sorely tempted to make the env variable I_HAVE_A_DECREPIT_OS but it 
wasn't as funny after the first few times. Probably a good idea to note this 
new variable in the README as well. 

==> I also found the README a bit confusing wrt. setting multiple hosts. 
Perhaps we can add an example to the README such as:

OLDMKTEMP=true PGBINDIR=/usr/bin HOST1=dev3 HOST2=dev2 
PGUSER=postgres ./run_test.sh test1

to make things a bit clearer?

==> test1: fails to finish under some circumstances. It usually works, but 
about 1/4 of the runs I did do this until I kill them:

$ OLDMKTEMP=true PGBINDIR=/usr/bin HOST1=dev3 HOST2=dev2 
PGUSER=postgres ./run_test.sh test1
test: test1
----------------------------------------------------
[boilerplate snipped]
----------------------------------------------------
creating origin DB: postgres -h dev3 -U postgres -p 5432 slonyregress1
add plpgsql to Origin
createlang: language "plpgsql" is already installed in database 
"slonyregress1"
loading origin DB with test1/init_schema.sql
done
creating subscriber 2 DB: postgres -h dev2 -U postgres -p 5432 slonyregress2
add plpgsql to subscriber
createlang: language "plpgsql" is already installed in database 
"slonyregress1"
loading subscriber 2 DB from slonyregress1
done
creating cluster
done
storing nodes
done
storing paths
done
launching originnode : /usr/bin/slon -s500 -g10 slony_regress1 
"dbname=slonyregress1 host=dev3 user=postgres port=5432"
launching: /usr/bin/slon -s500 -g10 slony_regress1 "dbname=slonyregress2 
host=dev2 user=postgres port=5432"
subscribing
done
generating 344 tranactions of random data
0 %
[snip]
100 %
done
launching polling script
loading data
done
33745 rows behind
33745 rows behind
33745 rows behind
33745 rows behind
33745 rows behind
[and it never finishes]

I'm running tests from host dev2. It passes for (HOST1=dev3, HOST2=dev3) 
(HOST1=dev2, HOST2=dev2) and (HOST1=dev2, HOST2=dev3). It regularly fails 
when HOST1=dev3, HOST2=dev2 (that is, the origin node is remote, the 
subscriber node is local). It sometimes does pass though, which seems odd.

The reciprocal case (running from dev3 with HOST1=dev2, HOST2=dev3) hasn't 
failed yet. 

I'll look into this one in more depth next week. Anyone got any suggested 
start points? Is the existence of a replicated DB (origin dev3, subscriber 
dev2) possibly snarling it up? 

Regards, Philip.

-- 

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

-----------------
Utiba Pty Ltd 
This message has been scanned for viruses and
dangerous content by Utiba mail server and is 
believed to be clean.



More information about the Slony1-general mailing list