Why am I getting constant local connections from user "postgres"?

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:

  1. Whether this is related to built-in PostgreSQL health checks or background tasks.
  2. If it’s expected behavior, is there any configuration to reduce or control this frequency?

I’d appreciate any insights or suggestions.

Thanks!

Hello Benny!

Thanks for the question.

  1. Whether this is related to built-in PostgreSQL health checks or background tasks.

This is totally normal. Aiven is collecting metrics to ensure the service is running smoothly and will continue to run smoothly. Few examples of these metrics are:

  • number and size of tables
  • databases and users that exist
  • estimated DB size
  • oldest connection

To be clear: Aiven does not look at the contents of any tables. Just metadata is collected to ensure health of the service and to help with investigating issues/load changes.

  1. If it’s expected behavior, is there any configuration to reduce or control this frequency?

There is no configuration to control this frequency.

1 Like