Re: transaction error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: pgsql-admin-owner@xxxxxxxxxxxxxx [mailto:pgsql-admin-
> owner@xxxxxxxxxxxxxx] On Behalf Of Rob Richardson
> Sent: Tuesday, November 29, 2011 1:35 PM
> To: pgsql-admin@xxxxxxxxxxxxxx
> Subject: Re:  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. 

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux