Josh Berkus josh
Wed Mar 16 18:50:07 PST 2005
Steve,

> In order to combine steps 5-8, I've just finished adding a switch to
> altperl/subscribe_set.pl that copies the schema over to the destination
> before creating the slonik script.

Keen.    

> Before I commit this, I would love to know if this is something others
> would like, and if there are any major problems with it.

Yes, I would like it, and I think you've already addressed most of the major 
problems.

> - Since there's no way to specify the order of tables being subscribed to
> the set, this creates some dependency problems when establishing foreign
> keys.

Well, I can see better ways to handle this than mangling pg_dump.  If we're 
only talking tables, I'd suggest using DB::Introspector to build up a set of 
FK chains and figuring out the "first" table that way.  If you don't want 
that kind of dependancy, then traverse pg_depend for the same effect.  You'd 
need to figure out what to do in the case of circular dependancies, but 
that's no different from doing it by hand.

Because the format of pg_dump *will* change.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


More information about the Slony1-general mailing list