Mikko Partio dun
Thu Sep 21 06:29:20 PDT 2006
cbbrowne at ca.afilias.info wrote:
>> 2. Is it possible to have a table created to a replicated database to be
>> automatically added to the replication set?
>>     
>
> No, a table can NEVER be added to an active, replicating replication set.
>
> Further, as there is no way to add triggers to system tables, there is no
> way to have a "hook" to allow the replication system to automatically
> detect  the introduction of new tables.
>
> The applicable dogma is that competent system designers don't simply throw
> new tables at their systems; adding tables to a system normally represents
> an upgrade process which requires some systematic process for its
> application.  Slony-I provides a systematic way (EXECUTE SCRIPT) to assist
> in the application of upgrades, which may be needed along with the
> creation of new replication sets to add in new replicable objects.
>
> There are things about this that are somewhat painful.  It's possible that
> further automation could be applied to some of this.  But at this point,
> it is what it is...
>
>   

Thanks for your quick reply.

I was suspecting something like this, unfortunately. My problem is that 
I'm doing my thesis work on database replication and Slony seems to be 
an ideal candidate. The company I'm doing it doesn't really have 
competent DBA's and therefore one of the requirements is to have an 
"automatic replication" of a table.

Perhaps one solution would be a script that periodically scans both 
_clustername.sl_table and pg_tables and would look for tables that are 
on the system table but not on the slony table. From there the script 
would create a new set and add the table to that set (and perhaps merge 
the new set with an old set). What do you think, would this be a 
feasible solution?

MP



More information about the Slony1-general mailing list