Don’t skip the discussion on advisory locks. In my experience nearly every nontrivial application that spans multiple machines has concurrency bugs that advisory locks are perfectly suited to fix.
replies(4):
In a project Im working on we have a single go package that holds a list of all advisory lock numbers as constants.