1. Switched to partition-all for several routines
2. Improved overall concurrency
3. Removed the transaction block (risky, I know, but I live life on the edge!)
-> The transaction was creating deadlocks within Postgres