Re: Statement-level rollback

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Statement-level rollback
Date: 2017-03-01 08:00:49
Message-ID: 0A3221C70F24FB45833433255569204D1F6A9D7F@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
> "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> writes:
> > As I stated here and at the PGConf.ASIA developer meeting last year,
> > I'd like to propose statement-level rollback feature.
>
> I do not really see how this would ever get past the compatibility problems
> that forced us to give up on server-side autocommit years ago.

Could you tell me more about that problem? What kind of incompatibility would this feature introduce?

> If you want to provide a client-side facility for this, perhaps that could
> fly.

Do you mean a feature of psqlODBC that implicitly issues SAVEPOINT and RELEASE SAVEPOINT for each SQL statement? One reason I want to implement the feature is to avoid eliminate those round-trips for performance. Or, do you mean a client-side connection parameter like "rollback_scope={transaction | statement}?" Yes, I'll implement it for major client drivers so that the driver issues "SET SESSION CHARACTERISTICS FOR TRANSACTION ROLLBACK SCOPE {TRANSACTION | STATEMENT}" upon connection. psqlODBC has already a connection parameter, Protocol, for that purpose.

Regards
Takayuki Tsunakawa

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-03-01 08:07:36 Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Previous Message Andres Freund 2017-03-01 07:22:25 Re: Time to drop old-style (V0) functions?

Browse pgsql-jdbc by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-01 15:24:10 Re: Statement-level rollback
Previous Message Tom Lane 2017-02-28 13:17:17 Re: Statement-level rollback