
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?




Hi John, can you expand on what you're doing or how you're using PostgreSQL through flask?
pg_locks is a view of all the locks in the DB server.
Are you manually setting locks?