@@ -108,8 +108,10 @@ decoder_raw_begin_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn)
108108 data -> isLocal = true;
109109 } else {
110110 OutputPluginPrepareWrite (ctx , true);
111+ elog (WARNING , "Send transation to %u to replica" , txn -> xid );
111112 appendStringInfo (ctx -> out , "BEGIN %u;" , txn -> xid );
112113 OutputPluginWrite (ctx , true);
114+ data -> isLocal = false;
113115 }
114116}
115117
@@ -120,6 +122,7 @@ decoder_raw_commit_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
120122{
121123 DecoderRawData * data = ctx -> output_plugin_private ;
122124 if (!data -> isLocal ) {
125+ elog (WARNING , "Send commit of %u to replica" , txn -> xid );
123126 OutputPluginPrepareWrite (ctx , true);
124127 appendStringInfoString (ctx -> out , "COMMIT;" );
125128 OutputPluginWrite (ctx , true);
@@ -476,7 +479,9 @@ decoder_raw_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
476479 if (data -> isLocal ) {
477480 return ;
478481 }
479- /* Avoid leaking memory by using and resetting our own context */
482+ elog (WARNING , "Send action %d in transaction %u to replica" , change -> action , txn -> xid );
483+
484+ /* Avoid leaking memory by using and resetting our own context */
480485 old = MemoryContextSwitchTo (data -> context );
481486
482487 /*
0 commit comments