PREPARE callback */
| 363 | |
| 364 | /* PREPARE callback */ |
| 365 | static void |
| 366 | pg_decode_prepare_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn, |
| 367 | XLogRecPtr prepare_lsn) |
| 368 | { |
| 369 | TestDecodingData *data = ctx->output_plugin_private; |
| 370 | TestDecodingTxnData *txndata = txn->output_plugin_private; |
| 371 | |
| 372 | if (data->skip_empty_xacts && !txndata->xact_wrote_changes) |
| 373 | return; |
| 374 | |
| 375 | OutputPluginPrepareWrite(ctx, true); |
| 376 | |
| 377 | appendStringInfo(ctx->out, "PREPARE TRANSACTION %s", |
| 378 | quote_literal_cstr(txn->gid)); |
| 379 | |
| 380 | if (data->include_xids) |
| 381 | appendStringInfo(ctx->out, ", txid %u", txn->xid); |
| 382 | |
| 383 | if (data->include_timestamp) |
| 384 | appendStringInfo(ctx->out, " (at %s)", |
| 385 | timestamptz_to_str(txn->commit_time)); |
| 386 | |
| 387 | OutputPluginWrite(ctx, true); |
| 388 | } |
| 389 | |
| 390 | /* COMMIT PREPARED callback */ |
| 391 | static void |
nothing calls this directly
no test coverage detected