mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
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
This commit is contained in:
parent
ea7857dddb
commit
beefab6540
@ -320,6 +320,9 @@ retry:
|
||||
XactLockTableWait(xwait, NULL, NULL, XLTW_None);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
/* Found our tuple and it's not locked */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Found tuple, try to lock it in the lockmode. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user