Home > Archive > Slony1 PostgreSQL Replication > February 2006 > query slony to find which node is master









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author query slony to find which node is master
Ryan Suarez

2006-02-07, 11:24 am

Greetings,

How do I query the slony replication system to determine which node is
the master?
I'm using slony 1.1.5, postgres 7.4.7, and debian sarge.

regards,
Ryan
John Sidney-Woollett

2006-02-07, 11:24 am

bp=# select * from _replicatename.sl_set;

set_id | set_origin | set_locked | set_comment
--------+------------+------------+--------------------
1 | 1 | | bp customer
2 | 1 | | bp statistics

Look at the set_origin column - that gives you the master node for that
set.

You really want to be asking which node does that set data originate from.

Think in terms of sets and not servers...

John

Ryan Suarez wrote:
> Greetings,
>
> How do I query the slony replication system to determine which node is
> the master?
> I'm using slony 1.1.5, postgres 7.4.7, and debian sarge.
>
> regards,
> Ryan
> ____________________
____________________
_______
> Slony1-general mailing list
> Slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> http://gborg.postgresql.org/mailman.../slony1-general

Christopher Browne

2006-02-07, 1:24 pm

Ryan Suarez wrote:

>Greetings,
>
>How do I query the slony replication system to determine which node is
>the master?
>
>

Nodes do not have master/slave roles.

The distinction that *does* exist is that a node may be the origin for a
particular set.

Look in the table sl_set; it will indicate the origin node for a given set.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com