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

Tatsuo Ishii ishii at postgresql.org
Wed Feb 12 10:12:48 JST 2014


Have you set sr_check_user and sr_check_password correctly?

sr_check_user = 'nobody'
                                   # Streaming replication check user
                                   # This is neccessary even if you disable streaming
                                   # replication delay check by sr_check_period = 0
sr_check_password = ''

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> 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


More information about the pgpool-general mailing list