Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7795f88

Browse files
knizhnikkelvich
authored andcommitted
More trace
1 parent 5759a8a commit 7795f88

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

arbiter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,8 @@ static void MtmTransReceiver(Datum arg)
688688
if ((~msg->disabledNodeMask & Mtm->disabledNodeMask) != 0) {
689689
/* Coordinator's disabled mask is wider than of this node: so reject such transaction to avoid
690690
commit on smaller subset of nodes */
691+
elog(WARNING, "Coordinator of distributed transaction see less nodes than node %d: %lx instead of %lx",
692+
msg->node, Mtm->disabledNodeMask, msg->disabledNodeMask);
691693
ts->status = TRANSACTION_STATUS_ABORTED;
692694
MtmAdjustSubtransactions(ts);
693695
}

multimaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ MtmBeginTransaction(MtmCurrentTrans* x)
636636
x->isPrepared = false;
637637
x->isTransactionBlock = IsTransactionBlock();
638638
/* Application name can be cahnged usnig PGAPPNAME environment variable */
639-
if (x->isDistributed && Mtm->status != MTM_ONLINE && strcmp(application_name, MULTIMASTER_ADMIN) != 0) {
639+
if (!IsBackgroundWorker && x->isDistributed && Mtm->status != MTM_ONLINE && strcmp(application_name, MULTIMASTER_ADMIN) != 0) {
640640
/* reject all user's transactions at offline cluster */
641641
MtmUnlock();
642642
elog(ERROR, "Multimaster node is not online: current status %s", MtmNodeStatusMnem[Mtm->status]);

multimaster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "pglogical_output/hooks.h"
99

1010
#define MTM_TUPLE_TRACE(fmt, ...)
11-
#if 0
11+
#if 1
1212
#define MTM_INFO(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
1313
#define MTM_TRACE(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
1414
#else

0 commit comments

Comments
 (0)