[pgpool-general: 2565] Why "show pool_nodes" indicating both upstream nodes are in "standby role"?

Weikai (Victor) Xie xieweikai at gmail.com
Wed Feb 12 10:06:10 JST 2014


Hi,

Our pgpool2 configuration uses load_balancing with two upstream nodes. The
two nodes are configured to using streaming replication. All seems work
well. I also tried to insert some data in my application which is using the
pgpool and it works just fine.

However, when I use psql to connect to pgpool2 and issue "show pool_nodes",
it tells me both nodes are standby.

ubuntu=>show pool_nodes;
 node_id |  hostname  | port | status | lb_weight |  role
---------+------------+------+--------+-----------+---------
 0       | 10.0.2.46  | 5432 | 2      | 0.500000  | standby
 1       | 10.0.1.248 | 5432 | 2      | 0.500000  | standby
(2 rows)

It puzzled me a lot. I'm expecting one should be the master (or primary?).

The key fields of my pgpool.conf are shown below
...
master_slave_mode = on
master_slave_sub_mode = 'stream'
load_balance_mode = on
parallel_mode = off
replication_mode = off
...


I also run select pg_is_in_recovery() on both upperstream nodes. They
correctly return t on the master node and f on the slave node.

On slave node:

caboodl at ip-10-0-1-248:~$ psql
psql (9.1.10)
Type "help" for help.

ubuntu=> select pg_is_in_recovery();
 pg_is_in_recovery
-------------------
 t
(1 row)


On master node:

ubuntu at ip-10-0-2-46:~$ psql
psql (9.1.10)
Type "help" for help.
caboodl=> select pg_is_in_recovery();
 pg_is_in_recovery
-------------------
 f
(1 row)


BTW. Is slave equals to standby and master equals to primary in the
terminology of pgpool2?



Regards,

Weikai (Victor)  Xie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20140212/987dc7bf/attachment.html>


More information about the pgpool-general mailing list