MCPcopy Create free account
hub / github.com/apache/cloudberry / PreventCommandIfParallelMode

Function PreventCommandIfParallelMode

src/backend/tcop/utility.c:492–501  ·  view source on GitHub ↗

* PreventCommandIfParallelMode: throw error if current (sub)transaction is * in parallel mode. * * This is useful partly to ensure consistency of the error message wording; * some callers have checked IsInParallelMode() for themselves. */

Source from the content-addressed store, hash-verified

490 * some callers have checked IsInParallelMode() for themselves.
491 */
492void
493PreventCommandIfParallelMode(const char *cmdname)
494{
495 if (IsInParallelMode())
496 ereport(ERROR,
497 (errcode(ERRCODE_INVALID_TRANSACTION_STATE),
498 /* translator: %s is name of a SQL command, eg CREATE */
499 errmsg("cannot execute %s during a parallel operation",
500 cmdname)));
501}
502
503/*
504 * PreventCommandDuringRecovery: throw error if RecoveryInProgress

Callers 4

standard_ProcessUtilityFunction · 0.85
nextval_internalFunction · 0.85
do_setvalFunction · 0.85
ExecCheckXactReadOnlyFunction · 0.85

Calls 3

IsInParallelModeFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected