-
Notifications
You must be signed in to change notification settings - Fork 444
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
Ignore walsender type queries #349
Conversation
8dd0978
to
3af51e3
Compare
Ignore walsender process queries
3af51e3
to
f7cedb6
Compare
@ankane Can you take a look at this whenever you are free ? |
@ankane Can I get some feedback on this one? It will be really helpful as we are planning to roll this out for a larger set audience |
Hey @bheemreddy181, thanks for the PR. However, I think it's good to show all queries on that page. |
@ankane |
Makes sense (was thinking this was for the Live Queries page). Let's treat it like autovacuum queries - include them in running queries but filter in the controller and show the count in the view if there are any (see |
Can you share some pointers on how to add |
I think I get it now, let me send out a PR |
@ankane |
For simplicity, I think we can make this a Postgres 10+ feature. |
So in that case do you want me to still filter those queries in home_controller? similar to |
You should be able to partition before autovacuum queries are partitioned, but in the Postgres < 10 case, none of the queries will have a backend type of |
Is this how you are expecting the query to look like - where version >=10 , select
|
You should be able to add a single line to the query:
|
Pushed changes, quick feedback will be appreciated |
Hey @bheemreddy181, looking at the code, I'm not sure the partition logic is correct. Can you make sure it works on your Postgres instance? Also, let's have the UI show |
3620982
to
1abd090
Compare
@ankane Tested locally PFB screenshot Do you think we should hide them from the queries page as well ? Or exclude the kill functionality for these queries ? Tested with one long running query and a walsender query |
Great, looking much better. Is there a reason it uses As mentioned earlier in the thread, I think they should be included on the Live Queries page (no changes there). Same thoughts for the "Kill all connections" feature. |
Not really was just following the autovaccum format , do you want me to change that ? |
177aca4
to
719d64e
Compare
Updated that |
Can we Ignore walsender process queries ?
Logical replication processes are walsender processes that can have the appearance of a long-running query if not specially treated. These should be ignored as they will always show up at the top of the slow query list otherwise. They have backend_type "walsender" (for 10+) and can be found using pg_stat_replication for 9.6.