Distributed lock with Postgres