pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid logging complaints about abandoned connections when using
Date: Tue, 05 Nov 2019 19:29:36 +0000
Message-ID: <E1iS4WG-0001Ky-7D@gemulon.postgresql.org> (raw)

Avoid logging complaints about abandoned connections when using PAM.

For a long time (since commit aed378e8d) we have had a policy to log
nothing about a connection if the client disconnects when challenged
for a password.  This is because libpq-using clients will typically
do that, and then come back for a new connection attempt once they've
collected a password from their user, so that logging the abandoned
connection attempt will just result in log spam.  However, this did
not work well for PAM authentication: the bottom-level function
pam_passwd_conv_proc() was on board with it, but we logged messages
at higher levels anyway, for lack of any reporting mechanism.
Add a flag and tweak the logic so that the case is silent, as it is
for other password-using auth mechanisms.

Per complaint from Yoann La Cancellera.  It's been like this for awhile,
so back-patch to all supported branches.

Discussion: https://postgr.es/m/CACP=ajbrFFYUrLyJBLV8=q+eNCapa1xDEyvXhMoYrNphs-xqPw@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/383602f9abaeeb5315d4a4f0c620d64843ee7f51

Modified Files
--------------
src/backend/libpq/auth.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1iS4WG-0001Ky-7D@gemulon.postgresql.org>
Permalink:  ../E1iS4WG-0001Ky-7D@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iS4WG-0001Ky-7D@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Avoid logging complaints about abandoned connections when using
  In-Reply-To: <E1iS4WG-0001Ky-7D@gemulon.postgresql.org>
  References: <E1iS4WG-0001Ky-7D@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox