[Pgpool-hackers] Why not display who is the master in SHOW pool_nodes ?

Guillaume Lelarge guillaume at lelarge.info
Wed Jan 5 21:19:31 UTC 2011


Le 05/01/2011 11:25, Gilles Darold a écrit :
> Le 05/01/2011 09:04, Guillaume Lelarge a écrit :
>> Le 05/01/2011 02:46, Tatsuo Ishii a écrit :
>>>> Le 30/12/2010 23:52, Gilles Darold a écrit :
>>>>> Sorry again I've sent the wrong patch, here is the one using
>>>>> REAL_PRIMARY_NODE_ID.
>>>>> Please apologies for so much post.
>>>>>
>>>> It compiles and runs. No bug found.
>>> I wonder what is shown in the field when operated in other than
>>> master/slave & streaming replication mode.
>> It says that all nodes are primary or all nodes are standby, which
>> obvisouly is wrong. The patch needs to check we are in master/slave mode
>> and in replication mode. Otherwise, it should say N/A. Gilles, ca, you
>> do this little change, please?
>>
> 
> Well in any case it display the master slave state, that mean that if we
> are not in master slave node 0 is always P and others are S. Will fix
> that as you want, here what I propose :
> 
> - In replication mode state is "R" for every node.
> - In master/slave mode we still have both "P" for the primary and "S"
> for secondaries.
> - In non master/slave mode nor replication mode all node states are set
> to "-"
> 
> I will used "IS_MASTER_NODE_ID(i)" instead of "PRIMARY_NODE_ID == i" to
> test the primary node.
> 
> Is that ok for you ?
> 

Yeah, that's fine.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com


More information about the Pgpool-hackers mailing list