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
pgAdmin can't cancel query when role field is filled in connection settings #7442
Comments
Hi @JulienPoulainBvd, |
Hello, |
Yes, it will allow A to cancel a query from user C. |
Thanks for the confirmation. Is there anything else that can be done to allow A (as B) to only be able to cancel their own queries? If granting that role is the only way to make people able to cancel their queries, where could I go to ask advises on how to setup my DB? |
You can ask for help related to DB on pgsql-admin@postgresql.org. |
Hello,
How I reproduce the issue:
This causes problems, for example when a user launches a query that consumes all server resources and is going to run for months. The user then clicks on the cancel button, when they realize their query is wrong, but the button doesn't do its job and the query continues. Later, other users complain about server being too slow and I need to cancel queries by hand or restart the server if there are "too much queries".
I succeeded to reproduce it, using pgAdmin 7.8 on Windows 10, in desktop mode. More details about pgAdmin's version in the below picture.
I did reproduce it on two different versions of PostGreSQL (the second one is an AWS Aurora instance):
When looking at the log file, I see this error which never appears in the interface:
2024-04-30 12:41:32,902: ERROR pgadmin: Failed to execute query (execute_void) for the server #15 - DB:postgres(Query-id: 1579538):
Error Message:must be a member of the role whose query is being canceled or member of pg_signal_backend
I don't know what is wrong here but something is wrong, because starting from the moment I connect to the server with username A, I don't do any role change or whatever, I just launch a query and try to cancel it, all using pgAdmin's interface. This is something that should always work.
Can you help me with this?
Thank you
The text was updated successfully, but these errors were encountered: