Exclude logging certain connections?

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Exclude logging certain connections?
Date: 2020-03-15 10:09:10
Message-ID: 1CF8C28E-A9B9-44F6-A849-B3898B8AEAF5@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

is there a way to exclude certain connections, for example recurring monitoring connections, from the postgres.log?

I found this from in old post on stackexchange.com:

postgres=# create role mon login;
CREATE ROLE
postgres=# alter role mon set log_connections=off;
ERROR: parameter "log_connections" cannot be set after connection start

(source: https://dba.stackexchange.com/questions/118018/is-it-possible-to-exclude-specific-users-in-log-activity-of-postgresql)

There is no connection at the time. So why do I get the error? And what can I do about it?

Cheers,
Paul

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-03-15 16:28:34 Re: Exclude logging certain connections?
Previous Message Peter Eisentraut 2020-03-15 05:53:53 Re: Reading WALs