Home > Back-end >  Disable disconnection logging on PostgresSQL
Disable disconnection logging on PostgresSQL

Time:06-04

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

CodePudding user response:

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

  • Related