In response to Andrew Sullivan <[EMAIL PROTECTED]>: > On Thu, Jun 07, 2007 at 02:46:02PM -0400, Bill Moran wrote: > > > > I have a need to connect to a database, and quickly and easily determine > > whether it is the slony master or a slony slave. Currently, I do a > > There's no way to check that, because it's not a meaningful question. > If you want to know whether a given _table_ is a replica or not, you > can find that out by looking in the _slony schema. Look for the > tab_set in _slony.sl_table for your table, then look in the sl_set > table for that set number, and look at the set_origin. Finally, > select last_value from sl_local_node_id. Note that this is a > sequence, so be careful with it!
Thanks. In our case, all the tables have the same origin, so that's a safe assumption to make. -- Bill Moran Collaborative Fusion Inc. http://people.collaborativefusion.com/~wmoran/ [EMAIL PROTECTED] Phone: 412-422-3463x4023 _______________________________________________ Slony1-general mailing list [email protected] http://lists.slony.info/mailman/listinfo/slony1-general
