Sarah Maston smaston at bzzagent.com
Tue Jan 15 12:34:10 PST 2008
--SUMMARY OF ISSUE--
 
I performed the following execute scripts on the master node.
The DDL went through on the master and created the two fields on the
specified table as predicted.
However, when the DDL reached the first subscriber (Node20) the log threw up
various errors about a table id different than the one being modified.
(from locking the set? The table with id = 105 was in the same set as the
table (id = 137) being updated).
 
At this point there was an endless looping of the error below.  The other
nodes that are subscribed to Node20 did not receive the update, and they did
not receive the new subscription to Node10 when we attempted a switch over
using ³SUBSCRIBE SET²s and then dropping Node20.
 
Finally, we just dropped them allŠ and started the cluster out from scratch.
 
I am a relatively new user.  We used to have a replication setup with a
master and three slaves running pg8.0.4 and slony1.1 and this kind of schema
upgrade went through without a hitch.
 
Does anyone have any clues as to what I did wrong or what I should have
done?   Any and all help is greatly appreciated.
 
~Sarah
e:smaston at bzzagent.com
 
 
--REPLICATION SETUP--
 
Postgres v8.2.5
Slony v1.2.12
 
                                         / --> node30
node10 --> node20  -->   | --> node40
                                         \ --> node50
 
Node10 is the master.
Node20 is the slave that then cascades to three other slaves.
 
--EXECUTE SCRIPTS--
 
#!/bin/sh
#
#Execute scripts for table alterations and updates..
#  
#
#
/usr/local/pgsql/bin/slonik <<_EOF_
cluster name = bzz_cluster;
node 10 admin conninfo='dbname= db host= a.b.c.d1 user= dbuser;
node 20 admin conninfo='dbname= db host= a.b.c.d2 user= dbuser;
node 30 admin conninfo='dbname= db host= a.b.c.d3 user= dbuser;
node 40 admin conninfo='dbname= db host= a.b.c.d4 user= dbuser;
node 50 admin conninfo='dbname= db host= a.b.c.d5 user= dbuser;
try {
execute script (
   set id = 1,
   filename = 'Slonize_file_1_set_1.sql',
   event node = 10
);
execute script (
   set id = 1,
   filename = 'Slonize_file_2_set_1.sql',
   event node = 10
);
}
on error {
exit 1;
}
echo 'Execute scripts complete. ';
_EOF_
 
 
--DDL FILES--
 
Slonize_file_1_set_1.sql
ALTER TABLE table_1 ADD COLUMN address_company_name varchar(100);
ALTER TABLE table_1 ADD COLUMN is_address_verified boolean;
 
Slonize_file_2_set_1.sql
ALTER TABLE table_1 ALTER COLUMN address_company_name SET DEFAULT NULL;
ALTER TABLE table_1 ALTER COLUMN is_address_verified SET DEFAULT false;
 
 
--LOG FILE from Node20--
 
2008-01-13 20:21:31 CST DEBUG2 remoteListenThread_10: queue event 10,795627
DDL_SCRIPT
2008-01-13 20:21:31 CST DEBUG2 remoteListenThread_10: queue event 10,795628
SYNC
2008-01-13 20:21:31 CST DEBUG2 remoteWorkerThread_10: Received event
10,795627 DDL_SCRIPT
2008-01-13 20:21:31 CST DEBUG2 remoteListenThread_10: queue event 10,795629
DDL_SCRIPT
2008-01-13 20:21:31 CST DEBUG2 remoteListenThread_10: queue event 10,795630
SYNC
Š
2008-01-13 20:21:31 CST INFO   prepare for DDL script - set:1 onlyonnode:-1
Š
2008-01-13 20:21:31 CST ERROR  remoteWorkerThread_10: "select
"_cluster".ddlScript_prepare_int(1, -1); " PGRES_FATAL_ERROR ERROR: Slony-I:
alterTableRestore(): Table with id 105 not
found
CONTEXT:  SQL statement "SELECT  "_ cluster".alterTableRestore( $1 )"
PL/pgSQL function "ddlscript_prepare_int" line 46 at perform
2008-01-13 20:21:31 CST ERROR  remoteWorkerThread_10: DDL preparation failed
- set 1 - only on node -1
2008-01-13 20:21:31 CST DEBUG2 slon_retry() from pid=22512
2008-01-13 20:21:31 CST DEBUG1 slon: retry requested
2008-01-13 20:21:31 CST DEBUG2 slon: notify worker process to shutdown





More information about the Slony1-general mailing list