diff options
author | Michael Paquier <michael@paquier.xyz> | 2024-11-28 09:43:26 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2024-11-28 09:43:26 +0900 |
commit | 3aae60c851badb601df47f46ee459f047c998f59 (patch) | |
tree | 28d8613c1d552fbba6aacbd45372e0b733f5fe1f /src/backend/access/transam/xact.c | |
parent | 0f13e1a78b145935e5a128a44cb828ea24bac72d (diff) |
Revert "Handle better implicit transaction state of pipeline mode"
This reverts commit d77f91214fb7 on all stable branches, due to concerns
regarding the compatility side effects this could create in a minor
release. The change still exists on HEAD.
Discussion: https://postgr.es/m/CA+TgmoZqRgeFTg4+Yf_CMRRXiHuNz1u6ZC4FvVk+rxw0RmOPnw@mail.gmail.com
Backpatch-through: 13
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r-- | src/backend/access/transam/xact.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 173314897c9..3f0f711307d 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -3427,6 +3427,16 @@ PreventInTransactionBlock(bool isTopLevel, const char *stmtType) stmtType))); /* + * inside a pipeline that has started an implicit transaction? + */ + if (MyXactFlags & XACT_FLAGS_PIPELINING) + ereport(ERROR, + (errcode(ERRCODE_ACTIVE_SQL_TRANSACTION), + /* translator: %s represents an SQL statement name */ + errmsg("%s cannot be executed within a pipeline", + stmtType))); + + /* * inside a function call? */ if (!isTopLevel) @@ -3537,6 +3547,9 @@ IsInTransactionBlock(bool isTopLevel) if (IsSubTransaction()) return true; + if (MyXactFlags & XACT_FLAGS_PIPELINING) + return true; + if (!isTopLevel) return true; |