From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Is there a way to log only a particular user connection attempts in Postgres?
Date: Fri, 22 Mar 2019 10:49:31 +0200
Message-ID: <d8c2d882-b84b-6219-aea5-d2726c6336b0@matrix.gatewaynet.com> (raw)
In-Reply-To: <1553228652335-0.post@n3.nabble.com>
References: <1553228652335-0.post@n3.nabble.com>
Hello
On 22/3/19 6:24 π.μ., pavan95 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 all 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).
You can't set that on a user level. At least not with pgsql 11. What you can do is use connection pooling (which is a good thing) so that login connections/disconnections will be not so frequent as to
create noise in your log files.
>
> 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-archive.org/PostgreSQL-admin-f2076596.html
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
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-admin@postgresql.org
Cc: achill@matrix.gatewaynet.com
Subject: Re: Is there a way to log only a particular user connection attempts in Postgres?
In-Reply-To: <d8c2d882-b84b-6219-aea5-d2726c6336b0@matrix.gatewaynet.com>
References: <1553228652335-0.post@n3.nabble.com> <d8c2d882-b84b-6219-aea5-d2726c6336b0@matrix.gatewaynet.com>
* 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