I have a need to connect to a database, and quickly and easily determine whether it is the slony master or a slony slave.
I use (for cluster _T1)select "_T1".getlocalnodeid('_T1') = (select set_origin from "_T1".sl_set limit 1);
which presumes that all sets have the same origin -- otherwise you can specify the set in the query.
Julian
_______________________________________________ Slony1-general mailing list [email protected] http://lists.slony.info/mailman/listinfo/slony1-general
