* In streaming mode, we don't display the changes as the transaction can abort * at a later point in time. We don't want users to see the changes until the * transaction is committed. */
| 893 | * transaction is committed. |
| 894 | */ |
| 895 | static void |
| 896 | pg_decode_stream_change(LogicalDecodingContext *ctx, |
| 897 | ReorderBufferTXN *txn, |
| 898 | Relation relation, |
| 899 | ReorderBufferChange *change) |
| 900 | { |
| 901 | TestDecodingData *data = ctx->output_plugin_private; |
| 902 | TestDecodingTxnData *txndata = txn->output_plugin_private; |
| 903 | |
| 904 | /* output stream start if we haven't yet */ |
| 905 | if (data->skip_empty_xacts && !txndata->stream_wrote_changes) |
| 906 | { |
| 907 | pg_output_stream_start(ctx, data, txn, false); |
| 908 | } |
| 909 | txndata->xact_wrote_changes = txndata->stream_wrote_changes = true; |
| 910 | |
| 911 | OutputPluginPrepareWrite(ctx, true); |
| 912 | if (data->include_xids) |
| 913 | appendStringInfo(ctx->out, "streaming change for TXN %u", txn->xid); |
| 914 | else |
| 915 | appendStringInfoString(ctx->out, "streaming change for transaction"); |
| 916 | OutputPluginWrite(ctx, true); |
| 917 | } |
| 918 | |
| 919 | /* |
| 920 | * In streaming mode, we don't display the contents for transactional messages |
nothing calls this directly
no test coverage detected