Re: [Bug / Question ] " authentication_timeout " is invalid.

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: 林俊彥 <james(dot)lin(at)cenoq(dot)com>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [Bug / Question ] " authentication_timeout " is invalid.
Date: 2015-09-16 15:52:51
Message-ID: CAMkU=1wxbupDiMWuEXN6Gw3L+MSgx7AfuPbouQCsDTgnK44Xhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Sep 16, 2015 at 3:27 AM, 林俊彥 <james(dot)lin(at)cenoq(dot)com> wrote:

> Hi, sir,
>
> the "postgresql.conf" 's "authentication_timeout" is not active.
>
> The Log:
>
> -------------------------------------------------------------------------------------------------
> [BEGIN] 2015/9/16 17:57:37
> [postgres(at)pg95 ~]$ psql -V
> psql (PostgreSQL) 9.5alpha2
> [postgres(at)pg95 ~]$ time psql -c 'show authentication_timeout ;'
> Password:
> authentication_timeout
> ------------------------
> 1min
> (1 row)
> real 4m39.528s
> user 0m0.003s
> sys 0m0.002s
>
> [END] 2015/9/16 18:03:10
>
> ---------------------------------------------------------------------------------------------------
> The document is said :
> From:
>
> http://www.postgresql.org/docs/9.4/static/runtime-config-connection.html
>
> authentication_timeout (integer)
>
> Maximum time to complete client authentication, in seconds. If a would-be
> client has not completed the authentication protocol in this much time, the
> server closes the connection. This prevents hung clients from occupying a
> connection indefinitely. The default is one minute (1m). This parameter
> can only be set in the postgresql.conf file or on the server command line.
>
> I can't find about this information or solution by goolge search or forum,
> Please tell me how to verify it is active . or check it running?
>

What happens behind the scenes is that psql first tries to connect without
a password. It is told that it can't connect without a password. It
closes the uncompleted connection. Then psql asks you for a password,
waits until you enter one, and then starts a new connection using the
password. So during the wait time, there is no pending connection to the
database to be timed out. It is the client program psql which is doing the
waiting, not the database server.

Cheers,

Jeff

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2015-09-16 20:55:13 Re: BUG #13589: content error
Previous Message Userob 2015-09-16 11:11:02 Re: BUG #13621: Program paths are registered incorrectly.