Skip to main content

how How to know there is a maintenance job runnningrunning on thea postgresql database

Source Link
Majid Azimi
  • 2.3k
  • 3
  • 23
  • 24

how to know there is a maintenance job runnning on the postgresql database

I have a python script on postgresql database which is fetching records from sql server database and inserting it to postgresql DB after some filtering. this jobs is running by cron every two minutes. I want to know when there is maintenance job such as autovacuum is running and if running forget fetching records. Is it possible to detect in python?