libpq: Allow connection strings and URIs to specify multiple hosts.

Robert Haas <rhaas@postgresql.org>

Commit: 274bb2b3857cc987cfa21d14775cae9b0dababa5
Author: Robert Haas <rhaas@postgresql.org>
Date: 2016-11-03T13:25:20Z
Releases: 10.0
libpq: Allow connection strings and URIs to specify multiple hosts.

It's also possible to specify a separate port for each host.

Previously, we'd loop over every address returned by looking up the
host name; now, we'll try every address for every host name.

Patch by me.  Victor Wagner wrote an earlier patch for this feature,
which I read, but I didn't use any of his code.  Review by Mithun Cy.

Files

PathChange+/−
doc/src/sgml/libpq.sgml modified +29 −9
src/interfaces/libpq/fe-auth.c modified +17 −11
src/interfaces/libpq/fe-connect.c modified +425 −182
src/interfaces/libpq/libpq-int.h modified +35 −6

Documentation touched