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

Function pg_decode_stream_truncate

contrib/test_decoding/test_decoding.c:950–970  ·  view source on GitHub ↗

* In streaming mode, we don't display the detailed information of Truncate. * See pg_decode_stream_change. */

Source from the content-addressed store, hash-verified

948 * See pg_decode_stream_change.
949 */
950static void
951pg_decode_stream_truncate(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
952 int nrelations, Relation relations[],
953 ReorderBufferChange *change)
954{
955 TestDecodingData *data = ctx->output_plugin_private;
956 TestDecodingTxnData *txndata = txn->output_plugin_private;
957
958 if (data->skip_empty_xacts && !txndata->stream_wrote_changes)
959 {
960 pg_output_stream_start(ctx, data, txn, false);
961 }
962 txndata->xact_wrote_changes = txndata->stream_wrote_changes = true;
963
964 OutputPluginPrepareWrite(ctx, true);
965 if (data->include_xids)
966 appendStringInfo(ctx->out, "streaming truncate for TXN %u", txn->xid);
967 else
968 appendStringInfoString(ctx->out, "streaming truncate for transaction");
969 OutputPluginWrite(ctx, true);
970}

Callers

nothing calls this directly

Calls 5

pg_output_stream_startFunction · 0.85
OutputPluginPrepareWriteFunction · 0.85
appendStringInfoFunction · 0.85
appendStringInfoStringFunction · 0.85
OutputPluginWriteFunction · 0.85

Tested by

no test coverage detected