Skip to content

Commit

Permalink
Reorder ifdefs
Browse files Browse the repository at this point in the history
  • Loading branch information
emelsimsek committed Oct 9, 2023
1 parent c69b45f commit 081fb94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backend/distributed/shardsplit/shardsplit_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ replication_origin_filter_cb(LogicalDecodingContext *ctx, RepOriginId origin_id)
* reordering phase which is above change_cb. So we do not need to send keepalive in
* change_cb.
*/
#if (PG_VERSION_NUM <= PG_VERSION_15)
#if (PG_VERSION_NUM < PG_VERSION_16)
static void
update_replication_progress(LogicalDecodingContext *ctx, bool skipped_xact)
{
Expand All @@ -118,7 +118,7 @@ update_replication_progress(LogicalDecodingContext *ctx, bool skipped_xact)
*/
if (ctx->end_xact || ++changes_count >= CHANGES_THRESHOLD)
{
#if (PG_VERSION_NUM == PG_VERSION_15)
#if (PG_VERSION_NUM >= PG_VERSION_15)
OutputPluginUpdateProgress(ctx, skipped_xact);

Check warning on line 122 in src/backend/distributed/shardsplit/shardsplit_decoder.c

View check run for this annotation

Codecov / codecov/patch

src/backend/distributed/shardsplit/shardsplit_decoder.c#L122

Added line #L122 was not covered by tests
#else
OutputPluginUpdateProgress(ctx);

Check warning on line 124 in src/backend/distributed/shardsplit/shardsplit_decoder.c

View check run for this annotation

Codecov / codecov/patch

src/backend/distributed/shardsplit/shardsplit_decoder.c#L124

Added line #L124 was not covered by tests
Expand Down Expand Up @@ -148,7 +148,7 @@ shard_split_change_cb(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
return;
}

#if (PG_VERSION_NUM <= PG_VERSION_15)
#if (PG_VERSION_NUM < PG_VERSION_16)

/* Send replication keepalive. */
update_replication_progress(ctx, false);
Expand Down

0 comments on commit 081fb94

Please sign in to comment.