[pgpool-general: 5678] Re: find_primary_node problem
Tatsuo Ishii
ishii at sraoss.co.jp
Wed Aug 2 22:42:13 JST 2017
>>>> Is it possible for you to enable debug log of Pgpool-II?
>>> Yes, I enable debug log, and I got:
>>> LOG: find_primary_node: checking backend no 0
>>> LOG: find_primary_node: checking backend no 1
>>> DEBUG: pool_read: read 13 bytes from backend 0
>>> DEBUG: authenticate kind = 5
>>> DEBUG: pool_write: to backend: 0 kind:p
>>> DEBUG: pool_read: read 318 bytes from backend 0
>>> DEBUG: authenticate kind = 0
>>> DEBUG: authenticate backend: key data received
>>> DEBUG: authenticate backend: transaction state: I
>>> DEBUG: do_query: extended:0 query:"SELECT pg_is_in_recovery()"
>>> DEBUG: pool_write: to backend: 0 kind:Q
>>> DEBUG: pool_read: read 75 bytes from backend 0
>>> DEBUG: do_query: kind: 'T'
>>> DEBUG: do_query: received ROW DESCRIPTION ('T')
>>> DEBUG: do_query: row description: num_fileds: 1
>>> DEBUG: do_query: kind: 'D'
>>> DEBUG: do_query: received DATA ROW ('D')
>>> DEBUG: do_query: kind: 'C'
>>> DEBUG: do_query: received COMMAND COMPLETE ('C')
>>> DEBUG: do_query: kind: 'Z'
>>> DEBUG: do_query: received READY FOR QUERY ('Z')
>>> DEBUG: pool_write: to backend: 0 kind:X
>>> DEBUG: find_primary_node: 1 node is standby
>>> DEBUG: find_primary_node: no primary node found
>>>
>>> Manually I can connect from each pgpool host to each postgresql
>>> instance, and I can run this query: SELECT pg_is_in_recovery()
>>> On the primary node I got:
>>> pg_is_in_recovery
>>> -------------------
>>> f
>>> (1 row)
>>>
>>> and on the secondary:
>>> pg_is_in_recovery
>>> -------------------
>>> t
>>> (1 row)
>> Pgpool-II version?
> ii pgpool2 3.6.5-1.pgdg16.04+1
> ii postgresql-9.6-pgpool2 3.6.5-1.pgdg16.04+1
Ok, it seems Pgpool-II looks at a stale status file. (it's
$logdir/pgpool_status, where $logdir is the "logdir" value specified
in pgpool.conf).
You could remove the file before restarting Pgpool-II and see if the
problem goes away.
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