|From:||Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>|
|Subject:||Re: Patch: Implement failover on libpq connect level.|
|Views:||Raw Message | Whole Thread | Download mbox|
On Sun, 25 Sep 2016 17:31:53 +0530
Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com> wrote:
> I have some more comments on libpq-failover-8.patch
> + /* FIXME need to check that port is numeric */
> Is this still applicable?.
Unfortunately, it was. I've fixed this problem in 9-th version of patch
> I think we need comments to know why we change default value based on
> number of elements in connection string. why default in not “any"
> when node count > 1.
> + /* loop over all the host specs in the node variable */
> + for (node = nodes; node->host != NULL || node->port != NULL; node++)
> I think instead of loop if we can move these code into a separate
> function say pg_add_to_addresslist(host, port, &addrs) this helps in
> removing temp variables like "struct node info” and several heap
> calls around it.
For some reason DNS resolving was concentrated in one place before my
changes. So, I've tried to not change this decision.
> +static char *
> +get_port_from_addrinfo(struct addrinfo * ai)
> Need some comments for this function.
> We use strdup in many places no where we handle memory allocation
Added some more memory allocation error checks.
> Comments not in sink with code.
|Next Message||Masahiko Sawada||2016-09-27 09:24:18||Re: Transactions involving multiple postgres foreign servers|
|Previous Message||Tom van Tilburg||2016-09-27 09:19:17||Re: inconsistent behaviour of set-returning functions in sub-query with random()|
|Next Message||Prasad Varakur||2016-09-29 00:44:08||reg license implications in implementing/using the JDBC spec|
|Previous Message||Mithun Cy||2016-09-25 12:01:53||Re: Patch: Implement failover on libpq connect level.|