| 859 | } |
| 860 | |
| 861 | static void |
| 862 | pg_decode_stream_commit(LogicalDecodingContext *ctx, |
| 863 | ReorderBufferTXN *txn, |
| 864 | XLogRecPtr commit_lsn) |
| 865 | { |
| 866 | TestDecodingData *data = ctx->output_plugin_private; |
| 867 | TestDecodingTxnData *txndata = txn->output_plugin_private; |
| 868 | bool xact_wrote_changes = txndata->xact_wrote_changes; |
| 869 | |
| 870 | pfree(txndata); |
| 871 | txn->output_plugin_private = NULL; |
| 872 | |
| 873 | if (data->skip_empty_xacts && !xact_wrote_changes) |
| 874 | return; |
| 875 | |
| 876 | OutputPluginPrepareWrite(ctx, true); |
| 877 | |
| 878 | if (data->include_xids) |
| 879 | appendStringInfo(ctx->out, "committing streamed transaction TXN %u", txn->xid); |
| 880 | else |
| 881 | appendStringInfoString(ctx->out, "committing streamed transaction"); |
| 882 | |
| 883 | if (data->include_timestamp) |
| 884 | appendStringInfo(ctx->out, " (at %s)", |
| 885 | timestamptz_to_str(txn->commit_time)); |
| 886 | |
| 887 | OutputPluginWrite(ctx, true); |
| 888 | } |
| 889 | |
| 890 | /* |
| 891 | * In streaming mode, we don't display the changes as the transaction can abort |
nothing calls this directly
no test coverage detected