Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7IvG-0002vd-Pr for pgsql-admin@arkaria.postgresql.org; Fri, 22 Mar 2019 12:05:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h7IvF-0001IR-C7 for pgsql-admin@arkaria.postgresql.org; Fri, 22 Mar 2019 12:05:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7IvF-0001IJ-11 for pgsql-admin@lists.postgresql.org; Fri, 22 Mar 2019 12:05:17 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7IvC-0004IT-0b for pgsql-admin@postgresql.org; Fri, 22 Mar 2019 12:05:16 +0000 Received: by mail-qt1-x841.google.com with SMTP id z17so2090491qts.13 for ; Fri, 22 Mar 2019 05:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vSqbdbv1LebRCVHfzUhqPBaQEO7e8E0y17ogZS/hpKU=; b=ea0BdOHiLs/KOTcbOdpDB5i0tSrx7yu9DkDxGgrLnfVuwRYla7zR5ll41IC8jKI47s 7bbFxSMMPePxQZfTapI7HiGNQUM14w0ERy8e/gYRWB9Txvv3jnBbXqR31edyYDUlRsEj Esd4DzLHLQXLqhFY3PEKf5V8Y2+04lHXGaCpbj4YJiiijFLeSfrl39YQH7CN0HDwpzGq w5sLueYoWLlXIbQr08sLK9s6FolgnpMMlDiyxF4tG9E0KAmDvqLob2f+v20PA9TZ0Kx4 c1hNd9sBJWpbGml8ONO/f4B5ZwIYsjK3fiimOqTUrVE3fqv0+q7BTzClOVCw5FZYpsHV bKdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vSqbdbv1LebRCVHfzUhqPBaQEO7e8E0y17ogZS/hpKU=; b=JTpWOE4FZ0ig9yQmbzyL9gTqu838VTCv1NzNKYs6/izBlO63uwy+ymFkN578lBabYn iTFhonWOPogKV31UPv5T5YIN0Dns/G9pYV5ZDylMDCWYNAjuZPsUL/npoTtuzPnbyrVT Lzc6ahPz68PGx0zU3Vj2wckJuDIUV9BMj1JSVI43sXPx7LeZMTQcyw84/2N8vUXgVi3d 9thSbqkno0PzvX6XcD3OVkc3l7G2Madp0U39V+d3+loD59Gb+qB3s80m2DWCwODHkceF kZlIAaVFHnyeK8P/R2ct/KjZ6BZcKjrnI3ZSohgoaUZ6qe/tlX0Mi196bTnvX7AUFdKY RTFw== X-Gm-Message-State: APjAAAVGEMKOXyNy51iX1NU3uj85iFeBQ7aLrqV++E42yNIPShYWInwM 7qME3svyR5kHX7ttme6PMYw= X-Google-Smtp-Source: APXvYqzgHksM6Pen9ZPzIV3ovUXoxhlKmVpPHXiNGxIx2QBS12+4au5Krg7jejVxAYFDiub3WE+oBg== X-Received: by 2002:aed:39c1:: with SMTP id m59mr7629738qte.114.1553256311720; Fri, 22 Mar 2019 05:05:11 -0700 (PDT) Received: from ?IPv6:2604:2000:14c4:8477:2d59:8885:2f29:edc4? ([2604:2000:14c4:8477:2d59:8885:2f29:edc4]) by smtp.gmail.com with ESMTPSA id v8sm4896238qtv.81.2019.03.22.05.05.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Mar 2019 05:05:09 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-382F26E2-C14F-4FB9-B439-21F4CD7A309D Mime-Version: 1.0 (1.0) Subject: Re: Is there a way to log only a particular user connection attempts in Postgres? From: Renee X-Mailer: iPhone Mail (16D57) In-Reply-To: Date: Fri, 22 Mar 2019 08:05:06 -0400 Cc: pavan95 , pgsql-admin Content-Transfer-Encoding: 7bit Message-Id: <24180F86-D86D-4A00-9A46-7638927287AE@gmail.com> References: <1553228652335-0.post@n3.nabble.com> To: Shreeyansh Dba List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-382F26E2-C14F-4FB9-B439-21F4CD7A309D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Have you considered changing your logging format to csv? The noise will still be in there but it=E2=80=99ll be in a form where you ca= n query it.=20 > On Mar 22, 2019, at 4:51 AM, Shreeyansh Dba wro= te: >=20 > Hi Pavan, >=20 > Go through the below link hope this will help you. > https://dba.stackexchange.com/questions/118018/is-it-possible-to-exclude-s= pecific-users-in-log-activity-of-postgresql >=20 > Thanks & Regards, > Shreeyansh DBA Team > www.shreeyansh.com >=20 >=20 >> On Fri, Mar 22, 2019 at 9:54 AM pavan95 wro= te: >> Hi Community, >>=20 >> Is there any way to log a user login/connection attempts in a log file ? >>=20 >> I know that we have log_connections parameter for this. But it logs all t= he >> connection attempts for all users across the instance. >>=20 >> But here my requirement is to exclude login attempts for a particular >> user(as in my case its application user and postgres user). >>=20 >> I have also seen "pg_audit" but it is not logging any login events. >>=20 >> Please shed some light on this scenario. >>=20 >> Looking forward to hear from you. >>=20 >> Regards, >> Pavan Teja, >> 9841380956 >>=20 >>=20 >>=20 >> -- >> Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.ht= ml >>=20 --Apple-Mail-382F26E2-C14F-4FB9-B439-21F4CD7A309D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hav= e you considered changing your logging format to csv?
=
The noise will still be in there but it=E2=80=99l= l be in a form where you can query it. 

On Ma= r 22, 2019, at 4:51 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:

Hi Pavan,
<= div class=3D"gmail_default" style=3D"font-size:small">

Thank= s & Regards,
Shreeyansh DBA Team
www.shreeyansh.com<= /div>


On Fri, Mar 22, 2019 at 9:54 AM pava= n95 <pavan.postgresdba@gma= il.com> wrote:
Hi Community,

Is there any way to log a user login/connection attempts in a log file ?
=
I  know that we have log_connections parameter for this. But it logs al= l the
connection attempts for all users across the instance.

But here my requirement is to exclude login attempts for a particular
user(as in my case its application user and postgres  user).

I have also seen "pg_audit" but it is not logging any login events.

Please shed some light on this scenario.

Looking forward to hear from you.

Regards,
Pavan Teja,
9841380956



--
Sent from: http://www.postgresql-archi= ve.org/PostgreSQL-admin-f2076596.html

= --Apple-Mail-382F26E2-C14F-4FB9-B439-21F4CD7A309D--