Create a manager API to monitor DB connection pools and other relevant database metrics.
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
### Main idea
Since it’s challenging to visibly track DB connection pools, Let's create manager API to monitor DB connections such as `max_connections`, `used`, `res_for_super`, `res_for_normal`.
You can check the `max_connections`, `used`, `res_for_super`, `res_for_normal` using below command.
```
select max_conn,used,res_for_super,max_conn-used-res_for_super res_for_normal from (select count(*) used from pg_stat_activity) t1, (select setting::int res_for_super from pg_settings where name=$$superuser_reserved_connections$$) t2, (select setting::int max_conn from pg_settings where name=$$max_connections$$) t3;
```

ref) https://teams.microsoft.com/l/message/19:b8327ceb372045beb1d0c6e28ca281da@thread.skype/1730080451689?tenantId=13c6a44d-9b52-4b9e-aa34-0513ee7131f2&groupId=483daa8a-29ee-4085-9f71-e93d7f112730&parentMessageId=1727416210374&teamName=project&channelName=KTCloud%20NPU&createdTime=1730080451689
### Alternative ideas
_No response_
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.