Skip to content

Commit 14d9fda

Browse files
committed
merge
2 parents d7e2dc3 + 07bb0c3 commit 14d9fda

12 files changed

+156
-118
lines changed

contrib/mmts/arbiter.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ static bool MtmSendToNode(int node, void const* buf, int size)
412412
MtmOnNodeDisconnect(node+1);
413413
return false;
414414
}
415-
MTM_TRACE("Arbiter restablished connection with node %d\n", node+1);
415+
MTM_LOG3("Arbiter restablished connection with node %d", node+1);
416416
} else {
417417
return true;
418418
}
@@ -456,7 +456,7 @@ static void MtmAcceptOneConnection()
456456
elog(WARNING, "Arbiter failed to write response for handshake message to node %d", resp.node);
457457
close(fd);
458458
} else {
459-
elog(NOTICE, "Arbiter established connection with node %d", req.hdr.node);
459+
MTM_LOG1("Arbiter established connection with node %d", req.hdr.node);
460460
BIT_CLEAR(Mtm->connectivityMask, req.hdr.node-1);
461461
MtmRegisterSocket(fd, req.hdr.node-1);
462462
sockets[req.hdr.node-1] = fd;
@@ -509,8 +509,8 @@ static void MtmAppendBuffer(MtmBuffer* txBuffer, TransactionId xid, int node, Mt
509509
}
510510
buf->used = 0;
511511
}
512-
MTM_TRACE("Send %s message CSN=%ld to node %d from node %d for global transaction %d/local transaction %d\n",
513-
messageText[ts->cmd], ts->csn, node+1, MtmNodeId, ts->gtid.xid, ts->xid);
512+
MTM_LOG3("Send %s message CSN=%ld to node %d from node %d for global transaction %d/local transaction %d",
513+
messageText[ts->cmd], ts->csn, node+1, MtmNodeId, ts->gtid.xid, ts->xid);
514514

515515
Assert(ts->cmd != MSG_INVALID);
516516
buf->data[buf->used].code = ts->cmd;

contrib/mmts/bgwpool.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ static void BgwPoolMainLoop(Datum arg)
3030
BackgroundWorkerUnblockSignals();
3131
BackgroundWorkerInitializeConnection(pool->dbname, NULL);
3232

33-
elog(WARNING, "Start background worker %d", id);
34-
3533
while(true) {
3634
PGSemaphoreLock(&pool->available);
3735
SpinLockAcquire(&pool->lock);

contrib/mmts/check-recovery.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rm -rf /home/knizhnik/postgres_cluster/contrib/mmts/tmp_check/log
2+
TESTDIR='/home/knizhnik/postgres_cluster/contrib/mmts' PATH="/home/knizhnik/postgres_cluster/tmp_install/home/knizhnik/postgres_cluster/dist/bin:$PATH" LD_LIBRARY_PATH="/home/knizhnik/postgres_cluster/tmp_install/home/knizhnik/postgres_cluster/dist/lib:$LD_LIBRARY_PATH" PGPORT='65432' PG_REGRESS='/home/knizhnik/postgres_cluster/contrib/mmts/../../src/test/regress/pg_regress' prove -I ../../src/test/perl/ --verbose t/001_basic_recovery.pl

contrib/mmts/decoder_raw.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ decoder_raw_begin_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn)
108108
Assert(lastXid != txn->xid);
109109
lastXid = txn->xid;
110110
if (MMIsLocalTransaction(txn->xid)) {
111-
MTM_TRACE("Skip local transaction %u\n", txn->xid);
111+
MTM_LOG3("Skip local transaction %u", txn->xid);
112112
data->isLocal = true;
113113
} else {
114114
OutputPluginPrepareWrite(ctx, true);
115-
MTM_TRACE("Send transaction %u to replica\n", txn->xid);
115+
MTM_LOG3("Send transaction %u to replica", txn->xid);
116116
appendStringInfo(ctx->out, "BEGIN %u;", txn->xid);
117117
OutputPluginWrite(ctx, true);
118118
data->isLocal = false;
@@ -126,12 +126,12 @@ decoder_raw_commit_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
126126
{
127127
DecoderRawData *data = ctx->output_plugin_private;
128128
if (!data->isLocal) {
129-
MTM_TRACE("Send commit of transaction %u to replica\n", txn->xid);
129+
MTM_LOG3("Send commit of transaction %u to replica", txn->xid);
130130
OutputPluginPrepareWrite(ctx, true);
131131
appendStringInfoString(ctx->out, "COMMIT;");
132132
OutputPluginWrite(ctx, true);
133133
} else {
134-
MTM_TRACE("Skip commit of transaction %u\n", txn->xid);
134+
MTM_LOG3("Skip commit of transaction %u", txn->xid);
135135
}
136136
}
137137

@@ -483,10 +483,10 @@ decoder_raw_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
483483

484484
data = ctx->output_plugin_private;
485485
if (data->isLocal) {
486-
MTM_TRACE("Skip action %d in transaction %u\n", change->action, txn->xid);
486+
MTM_LOG3("Skip action %d in transaction %u", change->action, txn->xid);
487487
return;
488488
}
489-
MTM_TRACE("Send action %d in transaction %u to replica\n", change->action, txn->xid);
489+
MTM_LOG3("Send action %d in transaction %u to replica", change->action, txn->xid);
490490

491491
/* Avoid leaking memory by using and resetting our own context */
492492
old = MemoryContextSwitchTo(data->context);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy