Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO9jp-00054y-O9 for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Oct 2020 01:19:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kO9jo-0004vl-MG for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Oct 2020 01:19:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO9jo-0004ve-GI for pgsql-bugs@lists.postgresql.org; Fri, 02 Oct 2020 01:19:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO9jm-00036i-9T for pgsql-bugs@lists.postgresql.org; Fri, 02 Oct 2020 01:19:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0921JnVj1118375; Thu, 1 Oct 2020 21:19:49 -0400 From: Tom Lane To: Alvaro Herrera cc: Peter Eisentraut , Henry Hinze , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop In-reply-to: <20201002000854.GA18560@alvherre.pgsql> References: <20201002000854.GA18560@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 01 Oct 2020 21:08:54 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1118373.1601601589.1@sss.pgh.pa.us> Date: Thu, 01 Oct 2020 21:19:49 -0400 Message-ID: <1118374.1601601589@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2020-Oct-01, Peter Eisentraut wrote: >> What's the difference between this case and what the test suite is testing? >> Is it that it replicates between two databases on the same instance? > I don't know why the tests pass, but the message > ERROR: error reading result of streaming command: > does appear in the logs after running src/test/subscription many times > (I see it in tests 001, 002, 013 and 014, apart from the new one in > 100). It's indeed surprising that these tests all pass! > I turned Henry's reproducer into the attached TAP test, and it does > reproduce the problem; but if I reduce the number of rows from 5000 to > 1000, then it no longer does. I don't quite see why this would be a > problem with a larger table only. Do you? I think we really need to figure that out before concluding that this problem is solved. Now that we've seen this, I'm wondering urgently what other coverage gaps we've got there. > The fix is the commented-out line in walsender.c; the test reliably > passes for me if I uncomment that, and the error message disappear from > the server logs in all the other tests. I agree that this is what we need to do code-wise; we can't let the protocol break stand, or we'll break all sorts of cross-version replication scenarios. However, we'd better also change the protocol spec to say that this is what is supposed to happen. regards, tom lane