It happens I had read the database troubleshooting part of Gitlab's Ops manual (https://gitlab.com/gitlab-com/runbooks/blob/master/troubleshooting/postgresql_replication.md) just a month ago, looking for monitoring info. I found many sound instructions on how to deal with database replication issues. I was very happy when I read they're also using Check_MK, but ...
It also made me decide pg_basebackup is too dangerous w/o dedicated DBA staff for two reasons:
- reason 1: lack of stability / fault tolerance
- reason 2: destructive resume on issue