Monitor/Alert on not locked tables on GitLab.com

On GitLab.com, which is already running with multiple databases setup, we lock writes on any legacy table:

  1. gitlab_main on the ci database
  2. gitlab_ci on the main database

We need some monitoring/alerting solutions on whether all the tables that are supposed to be locked are actually locked.

Context: #384852 (comment 1308278797)

Idea: Maybe we can add this functionality to the PostgreSQL checkup reports