I am trying to create a simple web application that will request db postgres and insert / delete data. Since this is a very simple application, I do not use an ORM layer like sqlalchemy. Instead, I would like to use psycopg directly. Now, I wonder when is the best time to close cursors and links? I am having trouble getting more details on when a connection is idling regarding access to a web application.
Thank!
source
share