Re: Statement-level rollback - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Statement-level rollback
Date
Msg-id 20181207193213.glqouoz6qvlexi6y@alap3.anarazel.de
Whole thread Raw
In response to Statement-level rollback  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Statement-level rollback  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Hi,

On 2018-12-07 16:20:06 -0300, Alvaro Herrera wrote:
>          case TBLOCK_BEGIN:
> +            s->rollbackScope = XactRollbackScope;
>              s->blockState = TBLOCK_INPROGRESS;
> +            if (s->rollbackScope == XACT_ROLLBACK_SCOPE_STMT)
> +            {
> +                PushTransaction();
> +                s = CurrentTransactionState;    /* changed by push */
> +                s->name = MemoryContextStrdup(TopTransactionContext, "pg internal");
> +                StartSubTransaction();
> +                s->blockState = TBLOCK_SUBINPROGRESS;
> +            }

Isn't this going to be performing ridiculously bad, to the point of
being not much but a trap for users?

I can see the feature being useful, but I don't think we should accept a
feature that'll turn bulkloading with insert into a server shutdown
scenario.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Statement-level rollback
Next
From: Alvaro Herrera
Date:
Subject: Re: Statement-level rollback