Re: libpq should append auth failures, not overwrite - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: libpq should append auth failures, not overwrite
Date
Msg-id alpine.DEB.2.21.1808131719410.29908@lancre
Whole thread Raw
In response to Re: libpq should append auth failures, not overwrite  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpq should append auth failures, not overwrite  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.


pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: WIP: "More fair" LWLocks
Next
From: Fabien COELHO
Date:
Subject: Re: libpq should not look up all host addresses at once