Sven Willenberger wrote:

>I am trying to create a trigger on a subscriber node's replicated table
>using "EXECUTE SCRIPT" but it is bailing and causing the slon process on
>the subscriber to shut down with the error:
>
>"begin transaction; set transaction ..... PGRES_FATAL_ERROR ERROR:
>Slony-I: Table with id 20 not found".
>
>Now, table id 20 is not the table I wanted to affect (when I look up the
>table name in sl_table it has an id of 13) and even so, there actually
>is a different table with id 20. 
>
>  
>

DDL is run on a set, not just a table.  As such, it affects the entire 
set, not just the table(s) that you are running changes against.  What 
DDL does is removes the slony triggers from all tables in the set, 
applies the changes, and then adds the slony triggers back.  Have you by 
any chance dropped the table associated with table id 20?

>For now, how can I remove the DDL event from the sync queue so that at
>least I can get the slon process running on the subscriber node again?
>Then, how can I go about figuring out how slon has the completely wrong
>table information ?
>
>  
>

I think that you are going to have to find the sl_log_1 entry for the 
DDL statement and remove it, but don't take my word for that.  If you 
get it wrong, you'll be in trouble.  I'll defer to someone else on this 
point.

-- 
Brad Nicholson  416-673-4106
Database Administrator, Afilias Canada Corp.


_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to