Brad Nicholson presumably uttered the following on 01/03/06 15:11:
> 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.
> 

I found the issue which was namely that the primary key had been removed 
from the table with id 20. Since the mechanism that slony uses to 
"disable" triggers on subscriber nodes is to tie the trigger to the 
primary key instead of the table, the error now makes sense: it could 
not find the primary key to attach the trigger to.

Removing the entry from sl_event (I believe) did allow replication to 
move on and removed the ddl attempt from happening.

Thanks,

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

Reply via email to