Earlier this week I had an interview at Andela, they offered us a challenge to build an API using postgreSQL and Flask. In my 3 years working as a software developer I had never interacted with PostgreSQL.
Fast forward I started experiencing weird bugs in my API. Postgres would freeze from time to time and this was because postgres would lock my db requests. I still don't understand this, why? What is the purpose of pg_locks?