v1-0001-Remove-extraneous-break-condition-in-logical-slot.patch
application/octet-stream
Filename: v1-0001-Remove-extraneous-break-condition-in-logical-slot.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v1-0001
Subject: Remove extraneous break condition in logical slot advance function
| File | + | − |
|---|---|---|
| src/backend/replication/slotfuncs.c | 0 | 4 |
From bc1ebcce98a935c34944bfd5355f04e36e776214 Mon Sep 17 00:00:00 2001 From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Date: Sat, 21 Oct 2023 00:12:57 +0000 Subject: [PATCH v1] Remove extraneous break condition in logical slot advance function There exists an extraneous break condition in pg_logical_replication_slot_advance(). When end of WAL or moveto LSN is reached, the main while condition helps to exit the loop, so no separate break condition is needed. --- src/backend/replication/slotfuncs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c index 6035cf4816..4e5581e7ff 100644 --- a/src/backend/replication/slotfuncs.c +++ b/src/backend/replication/slotfuncs.c @@ -523,10 +523,6 @@ pg_logical_replication_slot_advance(XLogRecPtr moveto) if (record) LogicalDecodingProcessRecord(ctx, ctx->reader); - /* Stop once the requested target has been reached */ - if (moveto <= ctx->reader->EndRecPtr) - break; - CHECK_FOR_INTERRUPTS(); } -- 2.34.1