Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a manager API to monitor DB connection pools and other relevant database metrics. #2984

Open
kmkwon94 opened this issue Oct 28, 2024 · 0 comments

Comments

@kmkwon94
Copy link
Contributor

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;

Image

ref) https://teams.microsoft.com/l/message/19:[email protected]/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant