Skip site navigation (1) Skip section navigation (2)

Re: Rollback on close [Was: Fwd: [DB-SIG] conn.close() idempotence]

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Rollback on close [Was: Fwd: [DB-SIG] conn.close() idempotence]
Date: 2011-10-19 18:34:11
Message-ID: CA+mi_8YA4Qmdgz99DaGDoypxJ+rzSvE-z020P3t80u1ti9Q3TQ@mail.gmail.com (view raw or flat)
Thread:
Lists: psycopg
On Wed, Oct 19, 2011 at 6:50 PM, Marko Kreen <markokr(at)gmail(dot)com> wrote:

> Let's clarify that further - DB-API *MUST* say that .close()
> [and also .__del__()] will rollback.  Eg - imagine
> driver accessing .dbf / .csv files directly.
>
> But there is no good reason to require communication
> with backend if the backend will rollback anyway
> on connection close.

Yes, this is our current position. Changing from it could only improve
the interaction between "sloppy code" and middleware, and as you have
pointed out this would make edge case more troublesome.

Thank you for the discussion, I wanted to hear the opinion of somebody
on the other side of the socket :)


-- Daniele

In response to

psycopg by date

Next:From: Frank KauffDate: 2011-10-19 19:35:45
Subject: Re: Error: no Python Codec for client encoding
Previous:From: Marko KreenDate: 2011-10-19 17:50:15
Subject: Re: Rollback on close [Was: Fwd: [DB-SIG] conn.close() idempotence]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group