This project demonstrate how you can create a Distributed Lock in PostgreSQL. Please refer to my blog post post to follow the code.
- Docker
- Create a sample PostgresSQL database using below command:
docker run --name distributed-lock-test -e POSTGRES_USER=dbUser -e POSTGRES_DB=distributed-lock-db -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres