[PyGreSQL] [ADMIN] pg_stat_activity howto
Christoph Zwerschke
cito at online.de
Sat Nov 7 02:31:38 EST 2009
raf schrieb:
> the cursor should close automatically when the python object
> is destroyed. and i need the db connection later so closing
> that isn't efficient.
Yes, but the same is true for files and many other ressources. It is
always better to explicitly close them. If you are using connection
pooling, it is also important that you close the connection immediately
after you're finished, so it can be put back into the pool for others.
-- Christoph
More information about the PyGreSQL
mailing list