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

Function pg_decode_stream_start

contrib/test_decoding/test_decoding.c:747–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

745}
746
747static void
748pg_decode_stream_start(LogicalDecodingContext *ctx,
749 ReorderBufferTXN *txn)
750{
751 TestDecodingData *data = ctx->output_plugin_private;
752 TestDecodingTxnData *txndata = txn->output_plugin_private;
753
754 /*
755 * Allocate the txn plugin data for the first stream in the transaction.
756 */
757 if (txndata == NULL)
758 {
759 txndata =
760 MemoryContextAllocZero(ctx->context, sizeof(TestDecodingTxnData));
761 txndata->xact_wrote_changes = false;
762 txn->output_plugin_private = txndata;
763 }
764
765 txndata->stream_wrote_changes = false;
766 if (data->skip_empty_xacts)
767 return;
768 pg_output_stream_start(ctx, data, txn, true);
769}
770
771static void
772pg_output_stream_start(LogicalDecodingContext *ctx, TestDecodingData *data, ReorderBufferTXN *txn, bool last_write)

Callers

nothing calls this directly

Calls 2

MemoryContextAllocZeroFunction · 0.85
pg_output_stream_startFunction · 0.85

Tested by

no test coverage detected