From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: duplicate connection failure messages |
Date: | 2010-11-24 22:04:30 |
Message-ID: | 201011242204.oAOM4UM25312@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > > I assume you are suggesting to use our inet_net_ntop() even if the
> > > system has inet_ntop().
> >
> > If you're going to have code to do the former, it doesn't seem to be
> > worth the trouble to also have code that does the latter ...
>
> OK, we will not call inet_ntop() at all. I moved the CIDR part of
> adt/inet_net_ntop.c into adt/inet_cidr_ntop.c, and moved the remaining
> "net" part to /port/inet_net_ntop.c.
>
> I then changed all uses of inet_ntoa to use inet_net_ntop(). While this
> churn would perhaps not be warranted just to allow for better error
> messages, I found pg_getaddrinfo_all() being called from
> libpq::connectDBStart(), which makes it not thread-safe. I am not
> excited about backpatching it but it is a threading bug.
>
> The output is as expected:
>
> $ psql -h localhost test
> psql: could not connect to server: Connection refused
> Is the server running on host "localhost" (127.0.0.1) and accepting
> TCP/IP connections on port 5432?
> $ psql -h 127.0.0.1 test
> psql: could not connect to server: Connection refused
> Is the server running on host "127.0.0.1" and accepting
> TCP/IP connections on port 5432?
Applied.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Radosław Smogura | 2010-11-24 22:04:49 | Re: Workarounds for getBinaryStream returning ByteArrayInputStream on bytea |
Previous Message | Tom Lane | 2010-11-24 22:03:48 | Re: profiling connection overhead |