Hi everyone,
I’ve noticed that my PostgreSQL instance is consistently logging short-lived connections from the user postgres
on host=[local]
. These connections seem to be cycling through my databases (upsave0
, upsave1
, upsave2
, etc.) with the system-stats
application name, and they disconnect almost immediately after connecting.
Here are some example log entries:
[pg-1fea4117-3]2025-01-27T11:26:13.291081[postgresql-16][13-1] pid=6610,user=postgres,db=upsave0,app=system-stats,client=[local] LOG: disconnection: session time: 0:00:00.028 user=postgres database=upsave0 host=[local]
[pg-1fea4117-3]2025-01-27T11:26:13.307915[postgresql-16][11-1] pid=6611,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG: connection received: host=[local]
[pg-1fea4117-3]2025-01-27T11:26:13.314908[postgresql-16][12-1] pid=6611,user=postgres,db=upsave1,app=[unknown],client=[local] LOG: connection authorized: user=postgres database=upsave1
[pg-1fea4117-3]2025-01-27T11:26:13.335442[postgresql-16][13-1] pid=6611,user=postgres,db=upsave1,app=system-stats,client=[local] LOG: disconnection: session time: 0:00:00.038 user=postgres database=upsave1 host=[local]
[pg-1fea4117-3]2025-01-27T11:26:13.348151[postgresql-16][11-1] pid=6612,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG: connection received: host=[local]
[pg-1fea4117-3]2025-01-27T11:26:13.354010[postgresql-16][12-1] pid=6612,user=postgres,db=upsave2,app=[unknown],client=[local] LOG: connection authorized: user=postgres database=upsave2
[pg-1fea4117-3]2025-01-27T11:26:13.369234[postgresql-16][13-1] pid=6612,user=postgres,db=upsave2,app=system-stats,client=[local] LOG: disconnection: session time: 0:00:00.024 user=postgres database=upsave2 host=[local]
Is this behavior normal? If so, what is causing it? I’m particularly curious about:
- Whether this is related to built-in PostgreSQL health checks or background tasks.
- If it’s expected behavior, is there any configuration to reduce or control this frequency?
I’d appreciate any insights or suggestions.
Thanks!