From: | "Nicholson, Brad (Toronto, ON, CA)" <bnicholson(at)hp(dot)com> |
---|---|
To: | Rob Richardson <RDRichardson(at)rad-con(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: transaction error handling |
Date: | 2011-11-30 13:19:40 |
Message-ID: | EC55DC235432104F8255702A8D7344D9256FF7EF@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 Rob Richardson
> Sent: Tuesday, November 29, 2011 1:35 PM
> To: pgsql-admin(at)postgresql(dot)org
> Subject: Re: [ADMIN] transaction error handling
>
> Very naïve question here: Why would you want to save the data from the
> first insert?
You might want your code to recover from an error and take a different approach.
> I thought the purpose of a transaction was to make sure that all steps
> in the transaction executed, or none of them executed. If Oracle saves
> half of the data between the beginning and ending of the transaction,
> doesn't that defeat the purpose of the transaction?
>
This functionality is something that Postgres can do today. We expose the ability to do this with explicit savepoints. The difference is that Oracle allows you to set it on a per transaction basis (I believe) and it will behave this way for all statements in the transaction, where as we need to do it explicitly. Looking through the archives there does seem to be a performance problem on commit in Postgres if you issue a lot of savepoints (there were discussions of a fix but I am not sure the status of this).
Brad.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-11-30 14:40:43 | Re: Database is in recovery mode. |
Previous Message | Rudolf van der Leeden | 2011-11-30 11:55:24 | Upgrade from 9.0.5 to 9.1.1 - Problems with citext indexes |
From | Date | Subject | |
---|---|---|---|
Next Message | Kasia Tuszynska | 2011-11-30 19:30:26 | Re: transaction error handling |
Previous Message | Bèrto ëd Sèra | 2011-11-30 08:48:39 | Re: transaction error handling |