James Black jfb
Wed Mar 16 18:59:27 PST 2005
> - 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.

I wrote a perl script that uses the Graph module, and a topological 
sort, to produce a correctly ordered list of tables.  It could 
certainly be improved in many ways, but we only needed to establish our 
replication set the once, so the script was somewhat ad-hoc.  I've 
included it below.  Feel free to take what you might need from it, 
ignore it, &c.

Best,
jfb

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TopologicalSort.pl
Type: application/octet-stream
Size: 3420 bytes
Desc: not available
Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050316/f973d13f/TopologicalSort-0001.obj
-------------- next part --------------

-- 
James Felix Black
Programmer, iParadigms LLC
510-287-9720 x250


More information about the Slony1-general mailing list