pgsql: When reporting the server as not responding, if the hostname was
When reporting the server as not responding, if the hostname was
supplied, also print the IP address. This allows IPv4 and IPv6 failures
to be distinguished. Also useful when a hostname resolves to multiple
IP addresses.
Also, remove use of inet_ntoa() and use our own inet_net_ntop() in all
places, including in libpq, because it is thread-safe.
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=ba11258ccbf364d85de48b8b7fd46953ea7bb4f4
Modified Files
--------------
doc/src/sgml/libpq.sgml | 4 +-
src/backend/utils/adt/Makefile | 2 +-
src/backend/utils/adt/inet_cidr_ntop.c | 295 ++++++++++++++++++
src/backend/utils/adt/inet_net_ntop.c | 530 --------------------------------
src/include/port.h | 4 +
src/include/utils/builtins.h | 4 +-
src/interfaces/libpq/fe-connect.c | 25 ++-
src/port/Makefile | 2 +-
src/port/getaddrinfo.c | 12 +-
src/port/inet_net_ntop.c | 275 +++++++++++++++++
10 files changed, 608 insertions(+), 545 deletions(-)