Rodrigo
Rodrigo

Reputation: 391

Disable disconnection logging on PostgresSQL

I am seeing a LOT of Postgres disconnection events on the logs, is there some way to disable this specific log?

May 30 10:13:08 my-app app/postgres.456514 [SILVER] [11-1]  sql_error_code = 00000 time_ms = "2022-05-30 10:13:07.600 UTC" pid="1235859" proc_start_time="2022-05-30 10:13:07 UTC" session_id="629398b4.12db93" vtid="" tid="0" log_line="3" database="XXX" connection_source="34.220.26.230(57398)" user="XXX" application_name="my-app-web.2" LOG:  disconnection: session time: 0:00:00.051 user=XXXX database=XXX host=34.220.26.230 port=57398

Upvotes: 1

Views: 1045

Answers (1)

Adelino Silva
Adelino Silva

Reputation: 930

The parameter is: log_disconnections (boolean) Causes session terminations to be logged. The log output provides information similar to log_connections, plus the duration of the session. Only superusers can change this parameter at session start, and it cannot be changed at all within a session. The default is off.

https://www.postgresql.org/docs/current/runtime-config-logging.html

Upvotes: 2

Related Questions