This article explains how to enable logging of database user logins and logouts in PostgreSQL 13 servers.
Aria Automation Config 8.x
To enable logging of database user logins and logouts, set the following parameters to ON in the configuration file located at "/srv/psql/13/data/postgres.conf"
.
log_connections = on
log_disconnections = on
Once the parameter is set to ON, restart the postgres service using the below command.
systemctl status postgresql-13.service