Re: Missing break in RelationFindReplTupleSeq

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Missing break in RelationFindReplTupleSeq
Date: 2020-01-31 13:58:31
Message-ID: 20200131135831.GA1550@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
fix-replident-full.patch text/x-diff 436 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hamid Akhtar 2020-01-31 14:02:27 Re: Do we need to handle orphaned prepared transactions in the server?
Previous Message Konstantin Knizhnik 2020-01-31 13:46:36 Missing break in RelationFindReplTupleSeq