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

Function pg_decode_commit_prepared_txn

contrib/test_decoding/test_decoding.c:391–410  ·  view source on GitHub ↗

COMMIT PREPARED callback */

Source from the content-addressed store, hash-verified

389
390/* COMMIT PREPARED callback */
391static void
392pg_decode_commit_prepared_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
393 XLogRecPtr commit_lsn)
394{
395 TestDecodingData *data = ctx->output_plugin_private;
396
397 OutputPluginPrepareWrite(ctx, true);
398
399 appendStringInfo(ctx->out, "COMMIT PREPARED %s",
400 quote_literal_cstr(txn->gid));
401
402 if (data->include_xids)
403 appendStringInfo(ctx->out, ", txid %u", txn->xid);
404
405 if (data->include_timestamp)
406 appendStringInfo(ctx->out, " (at %s)",
407 timestamptz_to_str(txn->commit_time));
408
409 OutputPluginWrite(ctx, true);
410}
411
412/* ROLLBACK PREPARED callback */
413static void

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