Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6f1cca

Browse files
committed
Remove unnecessary break in pg_logical_replication_slot_advance()
pg_logical_replication_slot_advance() included a break condition to stopwhen a targeted LSN is reached, when processing a series of WAL recordswith XLogReadRecord(). Since38a9573, it matched with the check ofits main while loop. This condition saved from an extra CFI check,actually pointless, so let's remove this condition and simplify thecode.In passing, fix an incorrect comment.Author: Bharath RupireddyReviewed-by: Tom Lane, Gurjeet SinghDiscussion:https://postgr.es/m/CALj2ACWfGDLQ2cy7ZKwxnJqbDkO6Yvqqrqxne5ZN4HYm=PRTGg@mail.gmail.com
1 parent40ebc41 commitb6f1cca

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎src/backend/replication/slotfuncs.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ pg_logical_replication_slot_advance(XLogRecPtr moveto)
500500
/* invalidate non-timetravel entries */
501501
InvalidateSystemCaches();
502502

503-
/* Decodeat least one record,until werun out of records */
503+
/* Decoderecordsuntil wereach the requested target */
504504
while (ctx->reader->EndRecPtr<moveto)
505505
{
506506
char*errm=NULL;
@@ -523,10 +523,6 @@ pg_logical_replication_slot_advance(XLogRecPtr moveto)
523523
if (record)
524524
LogicalDecodingProcessRecord(ctx,ctx->reader);
525525

526-
/* Stop once the requested target has been reached */
527-
if (moveto <=ctx->reader->EndRecPtr)
528-
break;
529-
530526
CHECK_FOR_INTERRUPTS();
531527
}
532528

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp