Postgresql: Add long transactions check