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

Function pg_decode_stream_message

contrib/test_decoding/test_decoding.c:924–944  ·  view source on GitHub ↗

* In streaming mode, we don't display the contents for transactional messages * as the transaction can abort at a later point in time. We don't want users to * see the message contents until the transaction is committed. */

Source from the content-addressed store, hash-verified

922 * see the message contents until the transaction is committed.
923 */
924static void
925pg_decode_stream_message(LogicalDecodingContext *ctx,
926 ReorderBufferTXN *txn, XLogRecPtr lsn, bool transactional,
927 const char *prefix, Size sz, const char *message)
928{
929 OutputPluginPrepareWrite(ctx, true);
930
931 if (transactional)
932 {
933 appendStringInfo(ctx->out, "streaming message: transactional: %d prefix: %s, sz: %zu",
934 transactional, prefix, sz);
935 }
936 else
937 {
938 appendStringInfo(ctx->out, "streaming message: transactional: %d prefix: %s, sz: %zu content:",
939 transactional, prefix, sz);
940 appendBinaryStringInfo(ctx->out, message, sz);
941 }
942
943 OutputPluginWrite(ctx, true);
944}
945
946/*
947 * In streaming mode, we don't display the detailed information of Truncate.

Callers

nothing calls this directly

Calls 4

OutputPluginPrepareWriteFunction · 0.85
appendStringInfoFunction · 0.85
appendBinaryStringInfoFunction · 0.85
OutputPluginWriteFunction · 0.85

Tested by

no test coverage detected