Christopher Browne cbbrowne
Wed Jan 5 20:34:52 PST 2005
sarlav kumar wrote:

> Hi,
>  
> Slony gives the following error message when a record is deleted from 
> a table being replicated:
> ERROR:  Slony-I: Table newt is replicated and cannot be modified on a 
> subscriber node. This should be because of the triggers defined on the 
> table for update/delete/insert etc.
>  
> Just out of curiosity, is it possible to implement trigger 
> functionality on events like creating a table or dropping a table? 
> Would that be useful at all? If that is possible, then it would 
> be possible for slony to give an error message when the table is 
> dropped during replication?
> Thanks,
> Saranya

The PostgreSQL trigger system doesn't provide any way to trigger things 
on DDL events, only on:
 a) INSERT
 b) UPDATE
 c) DELETE

It would in some sense be useful to have other such triggers, but that 
would require making wholesale changes to PostgreSQL itself, which is 
well outside the scope of what is plausible for Slony-I, which is 
expected to not only be compatible without altering PostgreSQL, but to 
be compatible with _past versions_ of PostgreSQL where such changes are 
impossible more or less by definition.

So no, it is absolutely not possible.


More information about the Slony1-general mailing list