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

Function pg_decode_rollback_prepared_txn

contrib/test_decoding/test_decoding.c:413–434  ·  view source on GitHub ↗

ROLLBACK PREPARED callback */

Source from the content-addressed store, hash-verified

411
412/* ROLLBACK PREPARED callback */
413static void
414pg_decode_rollback_prepared_txn(LogicalDecodingContext *ctx,
415 ReorderBufferTXN *txn,
416 XLogRecPtr prepare_end_lsn,
417 TimestampTz prepare_time)
418{
419 TestDecodingData *data = ctx->output_plugin_private;
420
421 OutputPluginPrepareWrite(ctx, true);
422
423 appendStringInfo(ctx->out, "ROLLBACK PREPARED %s",
424 quote_literal_cstr(txn->gid));
425
426 if (data->include_xids)
427 appendStringInfo(ctx->out, ", txid %u", txn->xid);
428
429 if (data->include_timestamp)
430 appendStringInfo(ctx->out, " (at %s)",
431 timestamptz_to_str(txn->commit_time));
432
433 OutputPluginWrite(ctx, true);
434}
435
436/*
437 * Filter out two-phase transactions.

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