Julian Scarfe julian at avbrief.com
Thu Jun 7 12:03:21 PDT 2007
> 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 




More information about the Slony1-general mailing list