[Pgpool-hackers] patch to add node_id column in pool_nodes "view"

Jean-Paul Argudo jean-paul at postgresqlfr.org
Wed Nov 17 21:59:04 UTC 2010


Hi!

Thanks Guillaume for such a quick feedback :)

Guillaume Lelarge a écrit :
>> I assumed the "i" index in the loop could be used to find from node 0 to
>> nodecount... Hope this is always true ?
>>
> 
> Yes, you're right.

Cool :) I read quite all the code to find the info... And I assumed that.

Next step is to add a new column about Read/Write or Read Only status of
the node.

In Master/Slave mode it could be usefull to know who's the "master" (in
case of a failback(.sh) it will be old_node+1 so, at the first failover
it will be 0+1=1, the next will be 1+1=2, etc..

I *know* pgpool-II does only *assume* (am I right?) who's the master,
but doesn't *yet* know for sure the master is in R/W ... because its all
about the good execution of failback.sh (exit 0). If failback.sh
succeeds, then pgpool-II *assumes* the n+1 is the new master...

(am I still right?)

So for the moment the column "Read-Write status" will only be based on
what pgpool-II *assumes* to be... I think next step then is to be sure
that the master is in R/W :)

This completes the reflexion on the thread on pgpool-general whose
subject is " Suggestion for Failover on Master/Slave Streaming
Replication"...

Now, digging back into pgpool-II code ;)

Cheers,

-- 
Jean-Paul Argudo
www.PostgreSQL.fr
www.Dalibo.com


More information about the Pgpool-hackers mailing list