* In streaming mode, we don't display the contents for transactional messages * as the transaction can abort at a later point in time. We don't want users to * see the message contents until the transaction is committed. */
| 922 | * see the message contents until the transaction is committed. |
| 923 | */ |
| 924 | static void |
| 925 | pg_decode_stream_message(LogicalDecodingContext *ctx, |
| 926 | ReorderBufferTXN *txn, XLogRecPtr lsn, bool transactional, |
| 927 | const char *prefix, Size sz, const char *message) |
| 928 | { |
| 929 | OutputPluginPrepareWrite(ctx, true); |
| 930 | |
| 931 | if (transactional) |
| 932 | { |
| 933 | appendStringInfo(ctx->out, "streaming message: transactional: %d prefix: %s, sz: %zu", |
| 934 | transactional, prefix, sz); |
| 935 | } |
| 936 | else |
| 937 | { |
| 938 | appendStringInfo(ctx->out, "streaming message: transactional: %d prefix: %s, sz: %zu content:", |
| 939 | transactional, prefix, sz); |
| 940 | appendBinaryStringInfo(ctx->out, message, sz); |
| 941 | } |
| 942 | |
| 943 | OutputPluginWrite(ctx, true); |
| 944 | } |
| 945 | |
| 946 | /* |
| 947 | * In streaming mode, we don't display the detailed information of Truncate. |
nothing calls this directly
no test coverage detected