Skip to content

Instantly share code, notes, and snippets.

@danypr92
Created November 23, 2018 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danypr92/f6ee644f6f5e9795e324a633bf97f64d to your computer and use it in GitHub Desktop.
Save danypr92/f6ee644f6f5e9795e324a633bf97f64d to your computer and use it in GitHub Desktop.
Com busquem les queries que estan blocant el sistema?

Búsqueda de queries més que bloquejen el sistema

Per trobar quina query s'esta executant en aquest moment?

SELECT * FROM pg_stat_activity WHERE state = 'active';

Matar queries per PID

SELECT pg_cancel_backend(<pid>);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment