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 1kNjrl-0003e4-Uo for pgsql-bugs@arkaria.postgresql.org; Wed, 30 Sep 2020 21:42:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNjrk-00060D-T9 for pgsql-bugs@arkaria.postgresql.org; Wed, 30 Sep 2020 21:42:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNjrk-000606-NZ for pgsql-bugs@lists.postgresql.org; Wed, 30 Sep 2020 21:42:24 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNjri-0001lj-Ah for pgsql-bugs@lists.postgresql.org; Wed, 30 Sep 2020 21:42:24 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8F34A35B; Wed, 30 Sep 2020 17:42:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 30 Sep 2020 17:42:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Z4nC/WaHLkIRhHWcl RUdMTCld9wZ9LHyPK7T58bpEoo=; b=AMO79MSQFcVzSlEMWQ9BnlNTRbVtpmZSB a/1WdYxkR/Y0lQ5FGRU0kf3lOLUy4UNMKUCje0KoSC5VayNVyxYlgRe2hLRJ3Ouc a+x2S7U5N5xd42lnMNL+HXmJMvrGBnfON7qnV44oa348HvHRF/oGTf99tOrDBNln sFokif1fQosxfSAzz14foq8kP5hVthRw48wDB2bpqx+aTFKOyPbyyuFMYzLyjb5r C4OAlYhQcsmoUMy2YejJ0mRKCSF8vokIPwbLItQ8gI1c5VxrxzSxtcZ+szPm8EJ4 qEsZiIq9hV3+VST3JsitRl5AQ/7KYTVSUa1DSNj6b9CDvugAudn5w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrfeefgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtuggjfgesthdtredttdervdenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepvefgleevgeeujeeghfegteeghfegheeifeehheelteetiedu ieeihffggfehffetnecukfhppeduledtrdelhedrudelrddugeeknecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhv hhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.148]) by mail.messagingengine.com (Postfix) with ESMTPA id AAD70328005D; Wed, 30 Sep 2020 17:42:18 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2EC4D2A1B4F; Wed, 30 Sep 2020 18:42:16 -0300 (-03) Date: Wed, 30 Sep 2020 18:42:16 -0300 From: Alvaro Herrera To: Tom Lane Cc: Henry Hinze , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop Message-ID: <20200930214216.GA5296@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <911656.1601501524@sss.pgh.pa.us> 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-Sep-30, Tom Lane wrote: > Henry Hinze writes: > > I've made an important observation! > > Since I had the impression this setup was already working with RC1 of PG > > 13, I re-installed RC1 and did the same test. And it's working fine! > > Ugh. So that points the finger at commits 07082b08c/bfb12cd2b, > which are the only nearby change between rc1 and 13.0. A quick > comparison of before-and-after checkouts confirms it. Oh dear. > After some digging around, I realize that that commit actually > resulted in a protocol break. libpqwalreceiver is expecting to > get an additional CommandComplete message after COPY OUT finishes, > per libpqrcv_endstreaming(), and it's no longer getting one. > > (I have not read the protocol document to see if this is per spec; > but spec or no, that's what libpqwalreceiver is expecting.) Yeah, definitely. The minimal fix seems to be to add an EndReplicationCommand() call in the T_StartReplicationCmd case. Testing this now ... > The question that this raises is how the heck did that get past > our test suites? It seems like the error should have been obvious > to even the most minimal testing. ... yeah, that's indeed an important question. I'm going to guess that the TAP suites are too forgiving :-(