Re: Missing break in RelationFindReplTupleSeq
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-01-31T13:58:31Z
Lists: pgsql-hackers
Attachments
- fix-replident-full.patch (text/x-diff) patch
On 2020-Jan-31, Konstantin Knizhnik wrote: > Eventually we find out that logical replication in the current version of > Postgres works significantly slower on table with replica identity full than > old pglogical implementation. > > The comment to RelationFindReplTupleSeq says: > > Note that this stops on the first matching tuple. > > But actually this function continue traversal until end of the table even if > tuple was found. > I wonder if break; should be added to the end of for loop. Wow, you're right, and the "break" is missing there. I propose it like this. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Add missing break out seqscan loop in logical replication
- beefab6540de 11.7 landed
- 42e3187a8204 12.2 landed
- 380bc8829594 10.12 landed
- 1c7a0b387d18 13.0 landed