Re: existence of a savepoint?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: existence of a savepoint?
Дата
Msg-id CAKFQuwa47-HWHTL898fbUC2pGDi2bm7qfCCRA4M9txy-L1nfwA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: existence of a savepoint?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: existence of a savepoint?  (Stuart McGraw <smcg4191@mtneva.com>)
Список pgsql-general
On Tue, May 29, 2018 at 4:01 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
On 2018-May-29, Stuart McGraw wrote:

> Alternatively if there were a setting to tell Postgresql to
> follow the SQL standard behavior of overwriting rather stacking
> savepoints, that too would also solve my current problem I think.
> Perhaps it is just my limited experience but the former behavior
> has always seemed more useful in practice than the latter.

I think if what we're doing breaks the semantics of the SQL spec, we're
definitely open to changing our behavior.  But that wouldn't solve your
problem today.  What I think could solve your problem today is a
C-language extension that uses xact.c callbacks in order to expose a
list that you can query from user space.
 
​Stuart:​

That said, have you measured this "leaking" and can show that it is non-trivial (given the large size of the overall transaction)?

Beyond that bulk ETL leveraging SAVEPOINT is not something I've encountered or contemplated.  Expecting and reacting to errors is expensive and itself error-prone.  I'd much rather try to design something that where failure is simply bad - usually by bulk loading with fewer constraints and then ensuring that future queries don't attempt to do something illegal like insert duplicates.

David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Pgagent is not reading pgpass file either in Windows or Linux.
Следующее
От: tango ward
Дата:
Сообщение: reduce number of multiple values to be inserted