提交 6845e104 编写于 作者: A Ashwin Agrawal

Error if AssignTransactionId is called by Reader.

QE_READER and QE_ENTRY_DB_SINGLETON are not expected to allocate transaction
IDs. They are just helper sub-processes to WRITER and should be using its xid.
上级 dda8f138
......@@ -496,6 +496,13 @@ AssignTransactionId(TransactionState s)
Assert(!TransactionIdIsValid(s->transactionId));
Assert(s->state == TRANS_INPROGRESS);
if (DistributedTransactionContext == DTX_CONTEXT_QE_READER ||
DistributedTransactionContext == DTX_CONTEXT_QE_ENTRY_DB_SINGLETON)
{
elog(ERROR, "AssignTransactionId() called by %s process",
DtxContextToString(DistributedTransactionContext));
}
/*
* Ensure parent(s) have XIDs, so that a child always has an XID later
* than its parent. Musn't recurse here, or we might get a stack overflow
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册