Re: Statement-level rollback

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
Subject: Re: Statement-level rollback
Date: 2018-12-08 04:29:16
Message-ID: CA+TgmobJ5483OHHkWT1MixBqvjuj6rMRBtZBGD1NxivmCmZWYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 7, 2018 at 3:50 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> On 2018-Dec-07, Robert Haas wrote:
> > More generally, whether or not we should "keep something away from our
> > users" really depends on how likely the upsides are to occur relative
> > to the downsides. We don't try to keep users from running DELETE
> > because they might delete data they want; that would be nanny-ism.
> > But we do try to keep them from reading dirty data from an uncommitted
> > transaction because we can't implement that without a risk of server
> > crashes, and that's too big a downside to justify the upside. If we
> > could do it safely, we might.
> >
> > From that point of view, this is doubtless not the worst feature
> > PostgreSQL will ever have, but it sure ain't the best.
>
> Well, look at this from this point of view: EnterpriseDB implemented
> this because of customer demand (presumably). Fujitsu also implemented
> this for customers. The pgjdbc driver implemented this for its users.
> Now 2ndQuadrant also implemented this, and not out of the goodness of
> our hearts. Is there any room to say that there is no customer demand
> for this feature?

There is no room at all for doubt on that point. The issue, at least
IMV, is collateral damage -- customers surely want it. Indeed, if
we'd been smarter, maybe we would've invented a way to make it work
like that from the beginning. But changing it now, even as an optional
behavior, will (as Tom and Andres are rightly saying) mean that every
tool and extension author potentially has a problem with things not
working as expected. One can make an argument that such pain is worth
enduring, or that it isn't.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-12-08 04:29:39 Re: extended query protcol violation?
Previous Message Robert Haas 2018-12-08 04:24:29 Re: Statement-level rollback