Content-Length: 259563 | pFad | http://github.com/postgrespro/postgres/commit/1c7a0b387d18c517d45e2f6ec7d8b7d1b2d5fe13

39 Add missing break out seqscan loop in logical replication · postgrespro/postgres@1c7a0b3 · GitHub
Skip to content

Commit 1c7a0b3

Browse 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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/executor/execReplication.c

Lines 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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/1c7a0b387d18c517d45e2f6ec7d8b7d1b2d5fe13

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy