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

[Idea] Enable/Disable Option for "Kill" Button #498

Open
doganilker opened this issue May 8, 2024 · 2 comments
Open

[Idea] Enable/Disable Option for "Kill" Button #498

doganilker opened this issue May 8, 2024 · 2 comments

Comments

@doganilker
Copy link

Hello,

I've been using PgHero and I appreciate the work you've put into this tool.

In the "Ideas" issue (#425), I noticed an idea that suggests adding an option to disable killing queries and connections (kill branch).

Making the "Kill" button functionality optional could indeed prevent accidental terminations and potentially enhance the user experience of PgHero.

I'm aware that similar issues were raised in 2021. However, since this idea is listed in the "Ideas", it might be something you're considering.

Many thanks.

@vineethvijay7
Copy link

would like this feature too

@iul1an
Copy link

iul1an commented Sep 13, 2024

This would be a great feature for me as well. Until then, I use a workaround.

I'm using PgHero with a non-superuser account and followed this guide. However, I changed the pghero.pg_terminate_backend(pid int) function so that it doesn't kill the queries:

CREATE OR REPLACE FUNCTION pghero.pg_terminate_backend(pid int) RETURNS boolean AS
$$
  SELECT true;
$$ LANGUAGE sql VOLATILE SECURITY DEFINER;

This adjustment allows me to "disable" the "kill" button without breaking the application or requiring code changes.

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

3 participants