How can I find out the maximum and current number of connections established on a PostgreSQL server?

    1 answer 1

    The max_connections parameter is responsible for the maximum number of connections, which can be obtained using the request

     SHOW max_connections; 

    The number of connections to the server can be obtained by running the request

     SELECT COUNT(*) FROM pg_stat_activity;