Le 06/01/2011 09:05, Gilles Darold a écrit : > Ok, here is the fixed patch. It still use PRIMARY_NODE_ID to check if a > node is primary because IS_MASTER_NODE_ID() always return node 0 as > primary (even in load balance mode). Maybe this macro should be renamed > DEFAULT_MASTER_NODE_ID() as this is what it is doing but this is not > really important. >
Seems way better. Thanks, Gilles. > > Le 05/01/2011 22:19, Guillaume Lelarge a écrit : >> 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 _______________________________________________ Pgpool-hackers mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-hackers
