pgsql: Add missing break out seqscan loop in logical replication

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add missing break out seqscan loop in logical replication
Date: 2020-02-03 22:00:44
Message-ID: E1iyjls-0003NN-QQ@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/beefab6540deca589c2d9a1d0f91fd98f11d303a

Modified Files
--------------
src/backend/executor/execReplication.c | 3 +++
1 file changed, 3 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-02-04 04:57:58 pgsql: Fix fuzzy error handling in pg_basebackup when opening gzFile
Previous Message Thomas Munro 2020-02-03 21:03:39 Re: pgsql: Handle lack of DSM slots in parallel btree build.