[pgpool-general: 5675] Re: find_primary_node problem

Nagy Ákos nagy.akos at libreoffice.ro
Wed Aug 2 18:06:21 JST 2017


2017. 08. 02. 9:34 keltezéssel, Tatsuo Ishii írta:
>> Hi,
>>
>> I installed a two member pgpool+postgresql cluster, and I have an
>> interesting problem.
>>
>> I use LDX containers and ubuntu as OS, and after a clean install I can
>> start pgpool2 without any problem, but after a service restart or
>> failover, pgpool2 can't check the primary node from postgresql
>> master-slave cluster.
>>
>> I got this error (and after 300 seconds - check interval - the pgpool2
>> service remain started, but can't connect to postgresql, and can't
>> determinate the master node):
>>
>> Aug  1 07:30:00 sd-ro-tm-dev-pg-01 pgpool[27998]: [27-1] 2017-08-01
>> 07:30:00: pid 27998: LOG:  find_primary_node: checking backend no 0
>> Aug  1 07:30:00 sd-ro-tm-dev-pg-01 pgpool[27998]: [28-1] 2017-08-01
>> 07:30:00: pid 27998: LOG:  find_primary_node: checking backend no 1
> No error logs found? Strange...
>
> 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)


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


-- 
Ákos



More information about the pgpool-general mailing list