pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix behavior of AND CHAIN outside of explicit transaction blocks
Date: Sun, 08 Sep 2019 14:34:49 +0000
Message-ID: <E1i6yHB-0000ib-Dj@gemulon.postgresql.org> (raw)

Fix behavior of AND CHAIN outside of explicit transaction blocks

When using COMMIT AND CHAIN or ROLLBACK AND CHAIN not in an explicit
transaction block, the previous implementation would leave a
transaction block active in the ROLLBACK case but not the COMMIT case.
To fix for now, error out when using these commands not in an explicit
transaction block.  This restriction could be lifted if a sensible
definition and implementation is found.

Bug: #15977
Author: fn ln <emuser20140816@gmail.com>
Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/862ef372d6b23629f93d4afc123ddd7d172501ac

Modified Files
--------------
doc/src/sgml/ref/commit.sgml               |  3 +-
doc/src/sgml/ref/rollback.sgml             |  3 +-
src/backend/access/transam/xact.c          | 58 +++++++++++++++-------
src/test/regress/expected/transactions.out | 78 ++++++++++++++++++++++++++++++
src/test/regress/sql/transactions.sql      | 43 ++++++++++++++++
5 files changed, 166 insertions(+), 19 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1i6yHB-0000ib-Dj@gemulon.postgresql.org>
Permalink:  ../E1i6yHB-0000ib-Dj@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1i6yHB-0000ib-Dj@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Fix behavior of AND CHAIN outside of explicit transaction blocks
  In-Reply-To: <E1i6yHB-0000ib-Dj@gemulon.postgresql.org>
  References: <E1i6yHB-0000ib-Dj@gemulon.postgresql.org>

* 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