Re: Basic subtransaction facility - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Basic subtransaction facility
Date
Msg-id 200404290426.i3T4Q1e25035@candle.pha.pa.us
Whole thread Raw
In response to Re: Basic subtransaction facility  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Basic subtransaction facility
List pgsql-patches
Alvaro Herrera wrote:
> On Mon, Apr 26, 2004 at 11:30:16PM -0400, Bruce Momjian wrote:
>
> > Alvaro, where are we on this patch.   I think the suggestion was to
> > throw FATAL rather than add a new error level.
>
> The assumption was that we would only want an additional level for
> catching can't-happen conditions.  ISTM this is not true.  Consider an
> out of memory error: do we want to only rollback the affected
> subtransaction, or the whole transaction tree?  If we want the latter we
> will have to invent a new elevel.
>
> In fact, I think we should mark ERROR as aborting the whole transaction
> tree, and create a new level which would abort the innermost
> subtransaction.  We would then change whatever is appropiate to the new
> elevel.  Doing otherwise would leave us open to unexpected conditions
> causing only subtrans abort, which could lead to unreliable behavior.
>
> In short, I think all elog(ERROR) should have different behaviour from
> ereport(ERROR), at least.  And I don't think the answer should be
> elog(FATAL) for the former.

Agreed we need a new error code to abort a subtransaction rather than
the entire transaction.

I don't understand your elog(ERROR) vs. ereport(ERROR) distinction.  Was
that a typo?

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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: SECURITY DEFINER not being propagated...
Next
From: Bruce Momjian
Date:
Subject: Re: Turning off cluster patch