feat: Adds 'skip-empty-xacts' support#248
feat: Adds 'skip-empty-xacts' support#248adrijshikhar wants to merge 4 commits intoeulerto:masterfrom
Conversation
|
@eulerto Please have a look and let me know what changes are required |
| -- predictability | ||
| SET synchronous_commit = on; | ||
|
|
||
| SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'wal2json'); |
There was a problem hiding this comment.
Do these tests exercise the proposal? Why don't you use simple statements (for example, using filter-tables or add-tables option)? You should include tests for both formats (see other test files).
wal2json.c
Outdated
|
|
||
| /* Transaction starts */ | ||
| OutputPluginPrepareWrite(ctx, true); | ||
| OutputPluginPrepareWrite(ctx, last_write); |
There was a problem hiding this comment.
Did you test this modification with the write-in-chunks option?
There was a problem hiding this comment.
no i have not
i will benchmark this change with write-in-chunks option
wal2json.c
Outdated
| /* version 2 */ | ||
| static void pg_decode_begin_txn_v2(LogicalDecodingContext *ctx, | ||
| ReorderBufferTXN *txn); | ||
| ReorderBufferTXN *txn, bool last_write); |
There was a problem hiding this comment.
There is an additional space here.
| * has requested to skip the empty transactions we can skip the empty streams | ||
| * even though the transaction has written some changes. | ||
| */ | ||
| typedef struct |
There was a problem hiding this comment.
Why do you need this new struct? Can't you use data->nr_changes?
|
@eulerto can you please go through the comments I posted? |
|
I don't follow. You asked a question about |
|
thanks I will go through that. I have addressed all of your comments and made changes accordingly. I am stuck on |
|
If it is changing a lot, don't run it. Instead, fix some superfluous changes (such as whitespace and new line additions). I can clean it up later, if required. |
|
yeah sure thanks |
fixes #106