Home > Archive > Slony1 PostgreSQL Replication > January 2006 > Check for "which node is current 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 Check for "which node is current master?"
Ujwal S. Setlur

2006-01-31, 8:25 pm

Hi,

My application needs to figure out which node is
currently the master, i.e. writable. Is there an easy
check for that? My app's interface to the db is C
through libpq.

Thanks,

Ujwal


____________________
____________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Christopher Browne

2006-01-31, 8:25 pm

Ujwal S. Setlur wrote:

>Hi,
>
>My application needs to figure out which node is
>currently the master, i.e. writable. Is there an easy
>check for that? My app's interface to the db is C
>through libpq.
>
>

Nodes are just nodes; they have no inherent "master" or "slave" role.

You can check to see which node is the origin for a given replication
set; that would involve looking in _clusterschema.sl_set where set_id =
some set you care about.
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