From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix bug in COMMIT AND CHAIN command.
Date: Fri, 19 Feb 2021 13:00:19 +0000
Message-ID: <E1lD5ON-0008QA-0l@gemulon.postgresql.org> (raw)
Fix bug in COMMIT AND CHAIN command.
This commit fixes COMMIT AND CHAIN command so that it starts new transaction
immediately even if savepoints are defined within the transaction to commit.
Previously COMMIT AND CHAIN command did not in that case because
commit 280a408b48 forgot to make CommitTransactionCommand() handle
a transaction chaining when the transaction state was TBLOCK_SUBCOMMIT.
Also this commit adds the regression test for COMMIT AND CHAIN command
when savepoints are defined.
Back-patch to v12 where transaction chaining was added.
Reported-by: Arthur Nascimento
Author: Fujii Masao
Reviewed-by: Arthur Nascimento, Vik Fearing
Discussion: https://postgr.es/m/16867-3475744069228158@postgresql.org
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/422012c98f8d929f9aa2b2e706b29512f61544e1
Modified Files
--------------
src/backend/access/transam/xact.c | 7 ++++++
src/test/regress/expected/transactions.out | 40 ++++++++++++++++++++++++++++++
src/test/regress/sql/transactions.sql | 11 ++++++++
3 files changed, 58 insertions(+)
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: fujii@postgresql.org
Subject: Re: pgsql: Fix bug in COMMIT AND CHAIN command.
In-Reply-To: <E1lD5ON-0008QA-0l@gemulon.postgresql.org>
References: <E1lD5ON-0008QA-0l@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