Created
July 23, 2018 06:27
-
-
Save rahulvramesh/07d60cefe578717a7b1f980c442eae30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT l.*,a.* | |
FROM pg_locks l | |
JOIN pg_stat_activity a USING (pid) | |
WHERE NOT granted; | |
sELECT pg_terminate_backend(31909); | |
sELECT pg_terminate_backend(754); | |
UPDATE "bookings" SET "status_id" = 203 WHERE (bookings.id = 997 ) | |
select txid_current(); | |
select * | |
from pg_stat_activity | |
where (state = 'idle in transaction') | |
and xact_start is not null; | |
INSERT INTO "gallery" ("image","created_by","status_id","created_at","booking_id") VALUES ($1,$2,$3,$4,$5) RETURNING "gallery"."id" | |
SELECT | |
pid, | |
now() - pg_stat_activity.query_start AS duration, | |
query, | |
state | |
FROM pg_stat_activity; | |
SELECT pg_terminate_backend(17615); | |
SELECT pg_cancel_backend(752); | |
SELECT pg_cancel_backend(25406); | |
SELECT pg_cancel_backend(6747); | |
SELECT pg_terminate_backend(pid) | |
FROM pg_stat_activity | |
WHERE datname='evhive' | |
AND state = 'idle in transaction' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment