pgpool / pgpool2

This is the official mirror of git://git.postgresql.org/git/pgpool2.git. Note that this is just a *mirror* - we don't work with pull requests on github. Please subscribe to pgpool-hackers mailing list from our website and submit your patch to this mailing list.
https://www.pgpool.net
Other
305 stars 87 forks source link

get_info_from_conninfo returns "host=" in host variable #22

Open nward opened 5 years ago

nward commented 5 years ago

Hi,

I am testing pgpool 4.0.2 at the moment, and note that verify_backend_node_status returns incorrect results, and decides that the replica servers are not connected:

verify_backend_node_status: primary 1 does not connect to standby 0

However, the servers are.

I have inspected the code, and I see that get_info_from_conninfo skips over "port=" but does not skip over "host=", so, the value of host is "host=", while port is simply the string of the port number.

When the comparison between the configured backend_host and host happens, this does not match - of course.

I note that get_info_from_conninfo is not used anywhere else, so I will submit at PR to resolve this by skipping over "host=".

pengbo0328 commented 5 years ago

Yes. You are correct. "host=" should be skipped like "port=". I will commit your patch.