Re: Statement-level rollback

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Statement-level rollback
Дата
Msg-id 20181207193213.glqouoz6qvlexi6y@alap3.anarazel.de
обсуждение исходный текст
Ответ на Statement-level rollback  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Statement-level rollback  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Statement-level rollback
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Statement-level rollback