<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello everybody and greetings from México City.<br>
<br>
<b>slony version: 2.0.7 with postgresql 9.0.4 running on debian
squeeze (and same issue arises with opensuse 11.04)</b><br>
I get the following message when trying to subscribe a node to a
replication set:<br>
<br>
<b><stdin>:4: row number 0 is out of range 0..-1<br>
Segmentation fault</b><br>
<br>
the slony instructions (generated with perltools) that caused this
error:<i><br>
</i>-----------------------------------------------------------------------------------------------------<br>
<i>cluster name = slony_cluster;<br>
node 1 admin conninfo='host=10.0.0.142 dbname=pgbench
user=postgres port=5432 password=postgres';<br>
node 2 admin conninfo='host=10.0.0.140 dbname=pgbenchslave
user=postgres port=5432 password=postgres';<br>
try {<br>
subscribe set (id = 1, provider = 1, receiver = 2, forward =
yes);<br>
}<br>
on error {<br>
exit 1;<br>
}<br>
echo 'Subscribed nodes to set 1';</i><br>
-----------------------------------------------------------------------------------------------------<br>
<br>
And my slon_tools.conf<br>
-----------------------------------------------------------------------------------------------------<br>
<br>
if ($ENV{"SLONYNODES"}) {<br>
require $ENV{"SLONYNODES"};<br>
} else {<br>
<br>
$CLUSTER_NAME = 'slony_cluster';<br>
<br>
$LOGDIR = '/var/log/slony1';<br>
<br>
$MASTERNODE = 1;<br>
<br>
$DEBUGLEVEL = 2;<br>
<br>
add_node(node => 1,<br>
host => '10.0.0.142',<br>
dbname => 'pgbench',<br>
port => 5432,<br>
user => 'postgres',<br>
password => 'postgres');<br>
<br>
add_node(node => 2,<br>
host => '10.0.0.140',<br>
dbname => 'pgbenchslave',<br>
port => 5432,<br>
user => 'postgres',<br>
password => 'postgres');<br>
}<br>
<br>
<br>
$SLONY_SETS = {<br>
"set1" => {<br>
"set_id" => 1,<br>
"table_id" => 1,<br>
"sequence_id" => 1,<br>
"pkeyedtables" => [<br>
'pgbench_tellers',<br>
'pgbench_history',<br>
'pgbench_accounts',<br>
'pgbench_branches'<br>
],<br>
},<br>
};<br>
<br>
if ($ENV{"SLONYSET"}) {<br>
require $ENV{"SLONYSET"};<br>
}<br>
# Please do not add or change anything below this point.<br>
1;<br>
-----------------------------------------------------------------------------------------------------<br>
When I fire up the script I get:<br>
2011-08-05 15:26:20 CDT LOG: unexpected EOF on client connection<br>
on the slon logs from the master node (where I'm calling it from)<br>
<br>
I've checked connectivity between nodes and everything is alright.
I've ran other scripts such as slonik_uninstall_nodes,
slonik_drop_node, and slonik_add_node and they're executed
successfully.<br>
<br>
The cluster was previously initialized with: <br>
-----------------------------------------------------------------------------------------------------------------------<br>
# INIT CLUSTER<br>
cluster name = slony_cluster;<br>
node 1 admin conninfo='host=10.0.0.142 dbname=pgbench user=postgres
port=5432 password=postgres';<br>
node 2 admin conninfo='host=10.0.0.140 dbname=pgbenchslave
user=postgres port=5432 password=postgres';<br>
init cluster (id = 1, comment = 'Node 1 - <a class="moz-txt-link-abbreviated" href="mailto:pgbench@10.0.0.142">pgbench@10.0.0.142</a>');<br>
<br>
# STORE NODE<br>
store node (id = 2, event node = 1, comment = 'Node 2 -
<a class="moz-txt-link-abbreviated" href="mailto:pgbenchslave@10.0.0.140">pgbenchslave@10.0.0.140</a>');<br>
echo 'Set up replication nodes';<br>
<br>
# STORE PATH<br>
echo 'Next: configure paths for each node/origin';<br>
store path (server = 1, client = 2, conninfo = 'host=10.0.0.142
dbname=pgbench user=postgres port=5432 password=postgres');<br>
store path (server = 2, client = 1, conninfo = 'host=10.0.0.140
dbname=pgbenchslave user=postgres port=5432 password=postgres');<br>
echo 'Replication nodes prepared';<br>
echo 'Please start a slon replication daemon for each node';<br>
-----------------------------------------------------------------------------------------------------------------------<br>
The slon daemon is running on both nodes. <br>
<br>
Any help will be highly appreciated. Thanks<br>
<br>
<br>
<br>
</body>
</html>