Skip to content

flask-psycopg2 based on python3.9 monitor idle in transaction and prepare script to kill transaction

Notifications You must be signed in to change notification settings

akatruk/python-psycopg2-idle-in-transactions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utility helps to define highweght locks in database PostgreSQL

System requirements:

  • docker
  • python3.9

Run in docker:

docker build -f container.dockerfile -t idle_in_transaction .
docker run -d -p 80:80 idle_in_transaction --name idle --network="host"

Run on localhost:

python3.9 idle_in.py

What it can do:

idle_in.py:

All sessions with status

Hightweght locks details

  • return hightweght details
  • return kill pid list for copy-paste
  • pg_wait query details should be appears if locks exists

Idle_in_transaction:

  • return indle_in_transaction details
  • return kill pid list for copy-paste

data.py:

Database analise

  • Size
  • Intensive load

Tables

  • Top 10 size
  • Top 10 intensive load
  • Bloat top 10
  • Toast tables

query.py:

Top query to tune

About

flask-psycopg2 based on python3.9 monitor idle in transaction and prepare script to kill transaction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published