Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iyjpG-0005NC-VA for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Feb 2020 22:04:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iyjpF-0000w2-Pj for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Feb 2020 22:04:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iyjpF-0000vu-GG for pgsql-hackers@lists.postgresql.org; Mon, 03 Feb 2020 22:04:13 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iyjpC-0004T2-GK for pgsql-hackers@postgresql.org; Mon, 03 Feb 2020 22:04:12 +0000 Received: by mail-qk1-x741.google.com with SMTP id q15so15941449qki.2 for ; Mon, 03 Feb 2020 14:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=DskgqMW7cgeRmA0vHvfmLk/UctOBbiNvGx7zGqfU/OM=; b=YoVIqkUc3FohoJOi+0zJ6jh5e4Nxtbni7Vv6y9V24Ms6kF5SmiFfuTAKGOWknKTAfG YZfed26rVYQPtEcdmkMu4162GOQPkaQ2Mvhd4cCHrxyXz9tZujJLWgu3tq81ZW6kh6NG tvi66hHovKuRDhycVif1VZg8wmpS+MNXFGpfZj6PKXrk8rSL3YeygSC4X1qvrx3Ug9pF xgT28Sg+cy0VmWJr3ja5V4Wpd/snAD2oI6F7DHVg6Fnknf9xn4oDyD7TKOA5RVaYXnXS q7sFLodUaZWDatMs+ix4dpEeebuDS0ojSHXvkINIUgzozG03Ne4fpkZNKK4VGhxPgrya k8Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=DskgqMW7cgeRmA0vHvfmLk/UctOBbiNvGx7zGqfU/OM=; b=SPD3bu8DSo6qzuGl0CTA75oIeeRTPonGem7mdqgYezJ6NyWUthh1XZx4/9myyqh5XJ bDciAlp6eRPkSpt4C511q3CJcrZn/n1usNRVc+6ghmUQlxhUR7c1hKUAaOZpJTc2DMSK wXTZtl2zCCE+4V1Y0/KLXSXXJSzZEQfNdjPoflTyZdBgYyDzqZ1uoG/I8SK46hr89Vpk wQ6yC3TpnYuVpo4omWbvPgdUVvQiIE/COqsVhlB/xJK8z1KIfUVQJfj/Ng9nrJDLYG5/ ZPLfinXfaZYtr6rfoovrPvEa1IalN8gXnFOnrJ9slQjj42W7mkd5JDZqymrJ3S1uwNaQ 43aw== X-Gm-Message-State: APjAAAW7QvL9qIIX/btxmhGCof/C4fbW9XamhzJwXrvqTP0VXRBWMbMG +kk+XjPVzDfKMcoYDKUhSe84tkMLniw= X-Google-Smtp-Source: APXvYqw/PwP7OkXiJDam7uwaWuR5imn6FoiOH3rhIEoIjSMEVIwACUgF/UsrDy2XybH1Bi1tfhmTEg== X-Received: by 2002:ae9:ef4b:: with SMTP id d72mr24806580qkg.27.1580767448533; Mon, 03 Feb 2020 14:04:08 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.217.181.3]) by smtp.gmail.com with ESMTPSA id s22sm10245781qke.19.2020.02.03.14.04.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 14:04:07 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 40C3B30082D; Mon, 3 Feb 2020 19:04:04 -0300 (-03) Date: Mon, 3 Feb 2020 19:04:04 -0300 From: Alvaro Herrera To: Konstantin Knizhnik Cc: PostgreSQL Hackers Subject: Re: Missing break in RelationFindReplTupleSeq Message-ID: <20200203220404.GA13588@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200131135831.GA1550@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jan-31, Alvaro Herrera wrote: > 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. Pushed, thanks for reporting. I had one very strange thing happen while testing this -- I put the tests to run in all branches in parallel, and they took about 12 minutes to finish instead of the normal 5. I tried to repeat this result but was unable to do so. My only hypothesis is that my laptop entered some kind of low-performance mode. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services