PostgreSQL Scheduler Hangs and Errors, Solved: Interfacing with pg_locks and Connection Management If you've been spending time debugging a scheduler that suddenly stops or throws errors, this post might help. I encountered an issue where a previously working scheduler would permanently hang under specific circumstances. Ultimately, the root cause was found in lock management and connection handling. Attempts and Pitfalls Initially, to improve the scheduler's stability, I changed the existing ad