Re: transaction error handling

From: "Nicholson, Brad (Toronto, ON, CA)" <bnicholson(at)hp(dot)com>
To: Kasia Tuszynska <ktuszynska(at)esri(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: transaction error handling
Date: 2011-11-29 22:06:48
Message-ID: EC55DC235432104F8255702A8D7344D9256FF62B@G9W0741.americas.hpqcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-bugs

> -----Original Message-----
> From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-
> owner(at)postgresql(dot)org] On Behalf Of Kasia Tuszynska
> Sent: Tuesday, November 29, 2011 3:35 PM
> To: Kevin Grittner; pgsql-admin(at)postgresql(dot)org
> Subject: Re: [ADMIN] transaction error handling
>
> Hi Kevin,
> Thank you, that is very helpful.
> I am not worried about the implicit commits. The "no implicit
> savepoint" was more of an issue, since it created a necessity to create
> and destroy savepoints per each sql statement to capture any statement
> level error without losing a transaction, that approach has prohibitive
> performance repercussions.
> I will check out the ON_ERROR_ROLLBACK feature.
> Thank you,
> Sincerely,
> Kasia

Be aware that this option is a psql option and not one in the database itself, which means unless you are executing your SQL via psql it will not be of help to you.

Also the implementation of this is that psql issues implicit savepoints for you before each command in a transaction and handles the rollback for you if needed (which sounds an awful lot like the performance concern you have).

This is a major pain for porting Oracle based applications over for those that rely on this functionality.

Brad.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kasia Tuszynska 2011-11-29 22:08:11 Re: transaction error handling
Previous Message Steve Crawford 2011-11-29 21:28:11 Re: Use a custom postgresql.conf?

Browse pgsql-bugs by date

  From Date Subject
Next Message Kasia Tuszynska 2011-11-29 22:08:11 Re: transaction error handling
Previous Message Walter Hurry 2011-11-29 20:49:35 Re: transaction error handling