MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_decode_stream_prepare

Function pg_decode_stream_prepare

contrib/test_decoding/test_decoding.c:834–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832}
833
834static void
835pg_decode_stream_prepare(LogicalDecodingContext *ctx,
836 ReorderBufferTXN *txn,
837 XLogRecPtr prepare_lsn)
838{
839 TestDecodingData *data = ctx->output_plugin_private;
840 TestDecodingTxnData *txndata = txn->output_plugin_private;
841
842 if (data->skip_empty_xacts && !txndata->xact_wrote_changes)
843 return;
844
845 OutputPluginPrepareWrite(ctx, true);
846
847 if (data->include_xids)
848 appendStringInfo(ctx->out, "preparing streamed transaction TXN %s, txid %u",
849 quote_literal_cstr(txn->gid), txn->xid);
850 else
851 appendStringInfo(ctx->out, "preparing streamed transaction %s",
852 quote_literal_cstr(txn->gid));
853
854 if (data->include_timestamp)
855 appendStringInfo(ctx->out, " (at %s)",
856 timestamptz_to_str(txn->commit_time));
857
858 OutputPluginWrite(ctx, true);
859}
860
861static void
862pg_decode_stream_commit(LogicalDecodingContext *ctx,

Callers

nothing calls this directly

Calls 5

OutputPluginPrepareWriteFunction · 0.85
appendStringInfoFunction · 0.85
quote_literal_cstrFunction · 0.85
OutputPluginWriteFunction · 0.85
timestamptz_to_strFunction · 0.50

Tested by

no test coverage detected