Re: Two round for Client Authentication

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Yinjie Lin <exialin37(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Two round for Client Authentication
Date: 2018-06-14 04:56:55
Message-ID: CAKFQuwa9LsPAnQ898UDQwqY04ikPVwHEgrBYKN2T32DWSfdC_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, June 13, 2018, Yinjie Lin <exialin37(at)gmail(dot)com> wrote:
>
> Why are there two such progresses forked? I think one round should be
> enough, like when using pgAdmin.
>

You can use the --password option to prevent it.

"""
This option is never essential, since psql will automatically prompt for a
password if the server demands password authentication. However, psql will
waste a connection attempt finding out that the server wants a password. In
some cases it is worth typing -W to avoid the extra connection attempt.
"""

In pgAdmin you've saved a password to the profile so the initial attempt
uses it. psql doesn't have a similar capability. Though I am unsure
whether the use of .pgpass would make any difference here...

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Atul Kumar 2018-06-14 05:28:53 question on streaming replication
Previous Message Marko Tiikkaja 2018-06-14 04:54:22 Re: Two round for Client Authentication