Re: EOF error
Chris Cogdon <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Feb 27, 2008, at 14:42 , Federico Di Gregorio wrote: > Yes. You need to explicitly close connection before the program exits > because Python does not destroy still-live objects. That's interesting... I thought it DID clean up "still-live" objects; as long as the objects have a __del__ method, python will call it on exit. Of course, if the process is kill'd, then all bets are off :) I ran a tiny experiment: * I created a database connection in the interactive shell, and ctrl- d'd the shell. No message. * Same thing if I used "raise SystemExit" * Then I created the connection again, and this time used kill -9 to kill the python process. I got the "unexpected EOF on client connection" message this time. * Same error message with a normal kill. Does that jibe with people's experiences ? -- Chris Cogdon <[email protected]> Chris: 650 242 3518 Truviso Inc. http:// www.truviso.com Switch: 650 242 3500 1065 E Hillsdale Blvd Suite 230 Foster City CA 94404 Fax: 650 242 3501 _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg