How to manage connections efficiently in Postgres or any database

//How to manage connections efficiently in Postgres or any database