pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Zenz <robert.zenz@sibvisions.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Information on savepoint requirement within transctions
Date: Mon, 29 Jan 2018 15:50:36 +0000
Message-ID: <5A6F42CB.2070907@sibvisions.com> (raw)
In-Reply-To: <1644.1517239990@sss.pgh.pa.us>
References: <5A6B3F78.6030908@sibvisions.com>
	<CANu8Fixd_cKLouG_euktWHs12Nc7Ld5VXZ-qu13yuSs7HKnVPw@mail.gmail.com>
	<5A6B4A12.9000002@sibvisions.com>
	<CANu8FixBRh=+aKFDPtWc6o4o_++tOTDQSGDOBTsQ5AnfiiCFCQ@mail.gmail.com>
	<CAKFQuwYY+uMxpgmWm=V=E99GL8x53cY5-oBnnqGb8ZhTmcbznw@mail.gmail.com>
	<5A6EDD41.70005@sibvisions.com>
	<CAKFQuwbTro=vw6UxkGaR6DRdaPxGBOKTsLDJFWqD9Uz-n7gVXA@mail.gmail.com>
	<5A6F28A7.5080800@sibvisions.com>
	<CAF-3MvMA-4hJU1NRLUHqwa1nPe5msFwP92MuNJFgZAyxozk5sA@mail.gmail.com>
	<5A6F3875.80607@sibvisions.com>
	<1644.1517239990@sss.pgh.pa.us>

On 29.01.2018 16:33, Tom Lane wrote:
> That behavior does exist, and so does documentation for it; you're just
> looking in the wrong place.
> 
> Years ago (7.3 era, around 2002) we experimented with a server-side
> GUC variable "AUTOCOMMIT", which switched from the implicit-commit-
> if-you-don't-say-BEGIN behavior to implicitly-issue-BEGIN-so-you-
> have-to-say-COMMIT-explicitly.  That was an unmitigated disaster:
> flipping the setting broke just about all client applications.  After
> spending many months trying to fix just the apps we ship with Postgres,
> and getting pushback from users whose code broke with the alternate
> setting, we gave up and removed the feature.  Instead we set project
> policy that if you want to modify transactional behavior you have to
> do it on the client side, where it doesn't risk breaking other apps.
> Institutional memory around here is very long, so any time proposals to
> change the server or wire-protocol behavior in this area come up, they
> get batted down.
> 
> What we do have though is client-side support for appropriate behaviors.
> In psql, see the AUTOCOMMIT and ON_ERROR_ROLLBACK control variables.
> Other interfaces such as JDBC have their own ideas about how this ought
> to work.

Very interesting. However, I'm talking explicitly about the behavior that occurs
when AUTOCOMMIT is switched off and a statement fails.

Most curiously, you already did such a feature (of what I was talking about)
request in 2007:
https://www.postgresql.org/message-id/flat/11539.1177352713%40sss.pgh.pa.us#11539.1177352713@sss.pgh...

view thread (32+ messages)  latest in thread

Message-ID: <5A6F42CB.2070907@sibvisions.com>
Permalink:  ../5A6F42CB.2070907@sibvisions.com/
Also on:    postgresql.org/message-id/5A6F42CB.2070907@sibvisions.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robert.zenz@sibvisions.com
  Subject: Re: Information on savepoint requirement within transctions
  In-Reply-To: <5A6F42CB.2070907@sibvisions.com>
  References: <5A6B3F78.6030908@sibvisions.com> <CANu8Fixd_cKLouG_euktWHs12Nc7Ld5VXZ-qu13yuSs7HKnVPw@mail.gmail.com> <5A6B4A12.9000002@sibvisions.com> <CANu8FixBRh=+aKFDPtWc6o4o_++tOTDQSGDOBTsQ5AnfiiCFCQ@mail.gmail.com> <CAKFQuwYY+uMxpgmWm=V=E99GL8x53cY5-oBnnqGb8ZhTmcbznw@mail.gmail.com> <5A6EDD41.70005@sibvisions.com> <CAKFQuwbTro=vw6UxkGaR6DRdaPxGBOKTsLDJFWqD9Uz-n7gVXA@mail.gmail.com> <5A6F28A7.5080800@sibvisions.com> <CAF-3MvMA-4hJU1NRLUHqwa1nPe5msFwP92MuNJFgZAyxozk5sA@mail.gmail.com> <5A6F3875.80607@sibvisions.com> <1644.1517239990@sss.pgh.pa.us> <5A6F42CB.2070907@sibvisions.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox