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

Gilles Darold gilles.darold at dalibo.com
Thu Dec 30 21:39:16 UTC 2010


Hi,

Here is an other path that display the master/slave state in the "SHOW
pool_nodes" command.

psql -p 9999 -c "SHOW pool_nodes;"

 node_id |   hostname   | port | status | lb_weight | state
---------+--------------+------+--------+-----------+-------
 0       | 192.168.1.11 | 5432 | 2      | 0.500000  | P
 1       | 192.168.1.12 | 5432 | 2      | 0.500000  | S
(2 rows)

P : stand for Primary
S : stand for Secondary

Feel free to apply the patch if you like it, for me it is really useful
to know who is the master at a given time.


-- 
Gilles Darold
http://dalibo.com - http://dalibo.org



More information about the Pgpool-hackers mailing list