Re: libpq should append auth failures, not overwrite

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: libpq should append auth failures, not overwrite
Date: 2018-08-13 15:35:28
Message-ID: alpine.DEB.2.21.1808131719410.29908@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Tom,

>> ISTM that both the hostname and ip should be shown to avoid confusion
>> about hosts with multiple ips, esp. as ips are given in any order by the
>> dns.
>> ...
>> Also for homogeneity, I'd suggest to always add the server line. If the
>> server introduction is inserted in all cases, including when only one host
>> is used, hints become partially redundant:
>> server "local.coelho.net" port 5434:
>> could not connect to server: Connection refused
>> Is the server running on host "local.coelho.net" (127.0.0.1) and accepting
>> TCP/IP connections on port 5434?
>> This would allow to simplify more hints, which you seem to have done on
>> "open read-write session" and "SHOW transaction_read_only" but not others.
>
> As I explained in my comments, the reason I did not do these things
> is that I didn't want to change the output for cases in which just a
> single host name is given. I still don't.

Ok, I get your argument when there is just one target server (cluster),
which is probably at least 99.9% of the use case in practice.

However, ISTM multiple ip & multiple hostname look pretty close.

I guess that the number of people that use these features is small, but
for these when things go wrong better messages are useful... so I would
see no harm to trigger the server introductory line when there are
multiples servers, whatever the reason why there are multiples servers.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2018-08-13 15:37:55 Re: libpq should not look up all host addresses at once
Previous Message Alexander Korotkov 2018-08-13 15:35:17 WIP: "More fair" LWLocks