Re: [HACKERS] Statement-level rollback - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject Re: [HACKERS] Statement-level rollback
Date
Msg-id 0A3221C70F24FB45833433255569204D1F6AAF8A@G01JPEXMBYT05
Whole thread Raw
In response to Re: [HACKERS] Statement-level rollback  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] Statement-level rollback  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Peter Eisentraut
> On 2/28/17 02:39, Tsunakawa, Takayuki wrote:
> > I'd like to propose statement-level rollback feature.  To repeat myself,
> this is requested for users to migrate from other DBMSs to PostgreSQL.  They
> expect that a failure of one SQL statement should not abort the entire
> transaction and their apps (client programs and stored procedures) can
> continue the transaction with a different SQL statement.
> 
> Can you provide some references on how other systems provide this feature?

Oracle doesn't.

SQL Server provides like this:

SET XACT_ABORT
https://msdn.microsoft.com/en-us/library/ms188792.aspx

MySQL doesn't.  BTW, MySQL enables changing autocommit mode with SET statement:

16.5.2.2 autocommit, Commit, and Rollback
https://dev.mysql.com/doc/refman/8.0/en/innodb-autocommit-commit-rollback.html



And above all, I've found EnterpriseDB supports statement-level rollback with GUC!  So PostgreSQL should be able to
do.

https://www.edbpostgres.com/docs/en/9.6/asguide/EDB_Postgres_Advanced_Server_Guide.1.17.html#pID0E0QUD0HA

----------------------------------------
edb_stmt_level_tx is set to TRUE, then an exception will not automatically roll back prior uncommitted database
updates.If edb_stmt_level_tx is set to FALSE, then an exception will roll back uncommitted database updates.
 

Note: Use edb_stmt_level_tx set to TRUE only when absolutely necessary, as this may cause a negative performance
impact.
----------------------------------------


Regards
Takayuki Tsunakawa




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] allow referring to functions without arguments when unique
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [HACKERS] Statement-level rollback