Created
October 8, 2024 22:00
-
-
Save akramarev/0f289270969b041d289cc57c86e70e04 to your computer and use it in GitHub Desktop.
[Long running transactions in Prostgres]
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 | |
pid | |
,datname | |
,usename | |
-- ,application_name | |
-- ,client_hostname | |
-- ,client_port | |
-- ,backend_start | |
-- ,query_start | |
,query | |
,state | |
,NOW() - query_start as query_duration | |
-- pg_terminate_backend(pid) | |
FROM pg_stat_activity | |
WHERE application_name NOT LIKE 'Debezium%' | |
and usename <> 'rdsadmin' | |
and usename <> 'rdsproxyadmin' | |
and usename <> 'clarify' | |
and usename = 'clarify_reader' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment