Index: db/backends/postgresql.py
===================================================================
--- db/backends/postgresql.py	(revision 1435)
+++ db/backends/postgresql.py	(working copy)
@@ -45,9 +45,11 @@
             return self.connection.rollback()
 
     def close(self):
+        pass
+
+    def cleanup(self):
         if self.connection is not None:
             self.connection.close()
-            self.connection = None
 
     def quote_name(self, name):
         if name.startswith('"') and name.endswith('"'):
Index: handlers/modpython.py
===================================================================
--- handlers/modpython.py	(revision 1435)
+++ handlers/modpython.py	(working copy)
@@ -11,7 +11,13 @@
     def __init__(self, req):
         self._req = req
         self.path = req.uri
+        req.server.register_cleanup(req,self._server_cleanup)
 
+    def _server_cleanup(self,data):
+        from django.core import db
+        if hasattr(db.db,'cleanup'):
+          db.db.cleanup()
+
     def __repr__(self):
         return '<ModPythonRequest\npath:%s,\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s,\nuser:%s>' % \
             (self.path, pformat(self.GET), pformat(self.POST), pformat(self.COOKIES),
