Re: existence of a savepoint?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Stuart McGraw <smcg4191(at)mtneva(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: existence of a savepoint?
Date: 2018-05-29 23:18:57
Message-ID: CAKFQuwa47-HWHTL898fbUC2pGDi2bm7qfCCRA4M9txy-L1nfwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 29, 2018 at 4:01 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tango ward 2018-05-30 00:10:05 reduce number of multiple values to be inserted
Previous Message Adrian Klaver 2018-05-29 23:15:08 Re: Pgagent is not reading pgpass file either in Windows or Linux.