[pgpool-general: 6011] Re: PgPool - Primary detection

Mathias Buresch mathias.buresch at de.clara.net
Fri Mar 30 00:00:10 JST 2018


Ok. I would think it’s better to check all nodes for primary and stop processing if there is such a case.
But thanks for the quick answer as always :)

Von meinem iPhone gesendet

Am 29.03.2018 um 10:41 schrieb Tatsuo Ishii <ishii at sraoss.co.jp>:

>> how does PgPool Check the primary node of Postgresql?
> 
> See the FAQ:
> https://pgpool.net/mediawiki/index.php/FAQ#How_does_pgpool-II_find_the_primary_node.3F
> 
>> At the moment both Postgresql server are Primary/Master..
>> But:
>> 
>> Every 2.0s: sudo -u postgres psql -h 213.221.108.90 -p 5433 -c 'show pool_nodes;’
>> 
>> node_id |    hostname    | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay
>> ---------+----------------+------+--------+-----------+---------+------------+-------------------+-------------------
>> 0             | 10.10.10.88 | 5432 | up     | 0.500000  | primary | 0          | false             | 0
>> 1             | 10.10.10.89 | 5432 | up     | 0.500000  | standby | 0          | true              | 0
>> 
>> So how can that be?
> 
> There could be number of causes, for example the node 1 got promoted
> by an accident (possibly by wrong operations). You could check the
> PostgreSQL log on node 1 to find the cause.
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> 
> - 


More information about the pgpool-general mailing list