*/
if (combiner->errorMessage == NULL)
{
+ MemoryContext oldcontext = MemoryContextSwitchTo(ErrorContext);
combiner->errorMessage =
pstrdup("unexpected ROLLBACK from remote node");
+ MemoryContextSwitchTo(oldcontext);
/*
* ERRMSG_PRODUCER_ERROR
* Messages with this code are replaced by others, if they are
combiner->errorCode[2], combiner->errorCode[3],
combiner->errorCode[4]) == ERRCODE_PRODUCER_ERROR)
{
+ MemoryContext oldcontext = MemoryContextSwitchTo(ErrorContext);
combiner->errorMessage = pstrdup(message);
/* Error Code is exactly 5 significant bytes */
if (code)
combiner->errorDetail = pstrdup(detail);
if (hint)
combiner->errorHint = pstrdup(hint);
+ MemoryContextSwitchTo(oldcontext);
}
/*
if (!pgxc_start_command_on_connection(primaryconnection, node, snapshot))
{
+ pgxc_node_remote_abort();
pfree(connections);
pfree(primaryconnection);
ereport(ERROR,
if (!pgxc_start_command_on_connection(connections[i], node, snapshot))
{
+ pgxc_node_remote_abort();
pfree(connections);
if (primaryconnection)
pfree(primaryconnection);
/* If explicit transaction is needed gxid is already sent */
if (!pgxc_start_command_on_connection(primaryconnection, node, snapshot))
{
+ pgxc_node_remote_abort();
pfree_pgxc_all_handles(pgxc_connections);
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
/* If explicit transaction is needed gxid is already sent */
if (!pgxc_start_command_on_connection(connections[i], node, snapshot))
{
+ pgxc_node_remote_abort();
pfree_pgxc_all_handles(pgxc_connections);
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),