Monitor the total number of locks acquired and the number of locks available
Per https://gitlab.com/gitlab-com/infrastructure/issues/1448#note_27283592 we should monitor the number of available/used locks so we know if we're running out of available locks:
Total number of locks acquired
There is a finite number of heavy-weight locks available in PostgreSQL, which is max_connections * max_locks_per_transaction
Running out of locks will prevent processes from being able to take new locks, resulting in errors
The pg_locks table contains the current PostgreSQL locks