Background leader lock
The idea
Only the process that holds a Postgres advisory lock runs background work. Other processes serve requests as warm standbys.
- The problem
- Two processes share the database during a release switch and could run the same jobs twice.
- Why it matters
- Release switches and rollbacks run without double work, and a drained process can take over in about a second.
- Where it stands
- In production as of
A step-by-step replay of this idea is not published yet. The library adds one when a recorded run shows it.