Re: Rollback on Error

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rollback on Error
Date: 2004-10-09 00:32:56
Message-ID: 200410090032.i990WuK03240@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Michael Paesold wrote:
> Alvaro Herrera Munoz wrote:
>
> > I think it would be wise to create a function to discover what savepoints
> > are available, and from that know when to release an automatically-
> > established savepoint.
> >
> > Of course, the function would only work when the backend is not in abort
> > state, but I think that's a reasonable restriction.
>
> Ok, that would need a set returning function in the backend, right? Could
> you help me write it when time comes? (I don't feel backend hacking savvy.)
>
> What about the resources consumed by savepoints
> a) that can be freed by a RELEASE (trx state stack, what else?)
> versus
> b) that cannot be freed (xid locks, anything else?)
>
> Is it worth the effort of extra work (not programmer's but runtime ;-)?
>
> Bruce,
> in Revision 1.1355 of the TODO you removed a line from the todo list that
> said:
> -Use nested transactions to prevent syntax errors from aborting a
> transaction
>
> I tought this is what I made a patch for, so shouldn't it be back for 8.1?
> Or at least something similar?

The item was adjusted to be more specific:

* Add an option to automatically use savepoints for each statement in a
multi-statement transaction.

When enabled, this would allow errors in multi-statement transactions
to be automatically ignored.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Close 2004-10-09 03:51:27 Re: foreign key constraints, cannot delete [SOLVED]
Previous Message Michael Fuhr 2004-10-09 00:14:50 Re: foreign key constraints, cannot delete

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-10-09 00:36:32 Re: more dirmod CYGWIN (was: APR 1.0 released)
Previous Message Oliver Elphick 2004-10-09 00:25:01 Inability to cast regclass is too restrictive