Re: EOF error
johnf <jfabiani-rLSQ/[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday 27 February 2008 06:09:31 pm Chris Cogdon wrote: > On Feb 27, 2008, at 17:47 , johnf wrote: > > On Wednesday 27 February 2008 05:23:59 pm you wrote: > >> On Feb 27, 2008, at 15:37 , johnf wrote: > >>> I got similar results. I also get an entry into the log > >>> "Abort" when I use connection.close(). But I don't get anything > >>> when I use > >>> del connection. > >> > >> You have a transaction in progress at the time ? Ie, perhaps you did > >> some select statements inside read_serializable mode ? > > > > I doubt that. I just open the connection and then make a select > > and close. > > That would be a transaction ;) It happens under the hood in most > (all?) python-postgresql connectors. Upon the first statement > executed, the connector will open up a transaction, even if it's a > simple select statement. > > So, I just repeated your experiment, with FULL debugging on, and I > get this: > > 2008-02-27 18:10:46 PST (25214)> LOG: statement: ABORT > > and if I do a "rollback" or a "commit" before I try and close, then I > DONT get the ABORT. > > So, yeah, you're inside a transaction,even after a simple select. OK so what is a guy suppose to do? It seems like a no win situation. -- John Fabiani