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

Appearance settings

Commit 1c7a0b3

Browse filesBrowse files
committed
Add missing break out seqscan loop in logical replication
When replica identity is FULL (an admittedly unusual case), the loop that searches for tuples in execReplication.c didn't stop scanning the table when once a matching tuple was found. Add the missing 'break'. Note slight behavior change: we now return the first matching tuple rather than the last one. They are supposed to be indistinguishable anyway, so this shouldn't matter. Author: Konstantin Knizhnik Discussion: https://postgr.es/m/379743f6-ae91-b866-f7a2-5624e6d2b0a4@postgrespro.ru
1 parent f1f10a1 commit 1c7a0b3
Copy full SHA for 1c7a0b3

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎src/backend/executor/execReplication.c

Copy file name to clipboardExpand all lines: src/backend/executor/execReplication.c
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode,
327327
XactLockTableWait(xwait, NULL, NULL, XLTW_None);
328328
goto retry;
329329
}
330+
331+
/* Found our tuple and it's not locked */
332+
break;
330333
}
331334

332335
/* Found tuple, try to lock it in the lockmode. */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.