From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Transaction chaining |
Date: | 2019-03-24 10:43:01 |
Message-ID: | E1h80aj-0008S0-4U@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Transaction chaining
Add command variants COMMIT AND CHAIN and ROLLBACK AND CHAIN, which
start new transactions with the same transaction characteristics as the
just finished one, per SQL standard.
Support for transaction chaining in PL/pgSQL is also added. This
functionality is especially useful when running COMMIT in a loop in
PL/pgSQL.
Reviewed-by: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Discussion: https://www.postgresql.org/message-id/flat/28536681-324b-10dc-ade8-ab46f7645a5a(at)2ndquadrant(dot)com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/280a408b48d5ee42969f981bceb9e9426c3a344c
Modified Files
--------------
doc/src/sgml/plpgsql.sgml | 14 ++
doc/src/sgml/ref/abort.sgml | 14 +-
doc/src/sgml/ref/commit.sgml | 23 ++-
doc/src/sgml/ref/end.sgml | 14 +-
doc/src/sgml/ref/rollback.sgml | 23 ++-
doc/src/sgml/spi.sgml | 29 +++-
src/backend/access/transam/xact.c | 73 +++++++-
src/backend/catalog/sql_features.txt | 2 +-
src/backend/executor/spi.c | 50 +++++-
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/equalfuncs.c | 1 +
src/backend/parser/gram.y | 19 +-
src/backend/tcop/utility.c | 4 +-
src/bin/psql/tab-complete.c | 8 +-
src/include/access/xact.h | 6 +-
src/include/executor/spi.h | 2 +
src/include/nodes/parsenodes.h | 1 +
.../plpgsql/src/expected/plpgsql_transaction.out | 28 +++
src/pl/plpgsql/src/pl_exec.c | 18 +-
src/pl/plpgsql/src/pl_funcs.c | 10 +-
src/pl/plpgsql/src/pl_gram.y | 18 +-
src/pl/plpgsql/src/pl_unreserved_kwlist.h | 2 +
src/pl/plpgsql/src/plpgsql.h | 2 +
src/pl/plpgsql/src/sql/plpgsql_transaction.sql | 23 +++
src/test/regress/expected/transactions.out | 191 +++++++++++++++++++++
src/test/regress/sql/transactions.sql | 63 +++++++
26 files changed, 601 insertions(+), 38 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-03-24 12:06:57 | pgsql: Make current_logfiles use permissions assigned to files in data |
Previous Message | Andres Freund | 2019-03-24 04:51:35 | pgsql: Remove spurious return. |