Re: transaction error handling
От | Nicholson, Brad (Toronto, ON, CA) |
---|---|
Тема | Re: transaction error handling |
Дата | |
Msg-id | EC55DC235432104F8255702A8D7344D9256FF7EF@G9W0741.americas.hpqcorp.net обсуждение исходный текст |
Ответ на | Re: transaction error handling (Rob Richardson <RDRichardson@rad-con.com>) |
Ответы |
Re: transaction error handling
|
Список | pgsql-admin |
> -----Original Message----- > From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin- > owner@postgresql.org] On Behalf Of Rob Richardson > Sent: Tuesday, November 29, 2011 1:35 PM > To: pgsql-admin@postgresql.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 forall statements in the transaction, where as we need to do it explicitly. Looking through the archives there does seemto be a performance problem on commit in Postgres if you issue a lot of savepoints (there were discussions of a fix butI am not sure the status of this). Brad.
В списке pgsql-admin по дате отправления: