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 1ksYLi-0005z8-In for pgsql-general@arkaria.postgresql.org; Thu, 24 Dec 2020 21:40:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ksYLh-0004Yv-CV for pgsql-general@arkaria.postgresql.org; Thu, 24 Dec 2020 21:40:41 +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 1ksYLf-0004Yo-SS for pgsql-general@lists.postgresql.org; Thu, 24 Dec 2020 21:40:41 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ksYLa-00020T-HX for pgsql-general@postgresql.org; Thu, 24 Dec 2020 21:40:39 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 61FEB5C00C1; Thu, 24 Dec 2020 16:40:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 24 Dec 2020 16:40:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=r Pl3cT1lDayCU94YesvuydsgBWYwFagIXhaLceMJpeY=; b=cdUt2wDJYxrRSVTX0 2sqN5uF3Zpvrl36LXib+TlWSiwWQiNcUzr2HeQBZ1iydXbfzodc9S5UF72jqUOT7 PapWYIe2vaTNi3Z+kSVWtlzCBptbM3kCEy+q7vGjFKh+2H7ydKvIJvKdBjJKErvV 0uSKO2g2ZHDG0Y6VPp1b+Z09GQU2jvj227C1N0v0WMtVV4HIPE8ijl+ypvdWVLC5 z3k6MSYXxBNoGtzKNsfi5Z7eRt0p1XBY/9mQF4ulBIrOo6LWkPR6EF9gTZ1s8x4r b40wZYQatqlv+Z7bn39ZdQ7cSshqgWChLZT9ny5PRV0Zt2WPbcB3bO9Rnr6z5LwY QxbLg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=rPl3cT1lDayCU94YesvuydsgBWYwFagIXhaLceMJp eY=; b=Wji78CAUwOI9Ud5mWOIIxBR4IsdUkYm2F+Zt8m+LuAeeoL0oUr4vG8oHx jr3sZRwx2SAzz9Pac6QC7uEy++3+o+HtjgPp9cniRoQ6xkcVq9B9c3fKEe3gkPiW HQg3oF//l5y0W4njXudmSzgqA0rr87c5tw18cDEncQ1+SGjD2wHqOEDEKog53CyU ILI3PDV3TpZ8CAc7tuDXlpOvIe0vrjqSK5JWYEERVn2yhX7fHAV66zpAC1jy8qG5 Xy6PyCKdqkF5A1Km5ZO6nfJ6bkJ0U5wewJ/RV26wfbJjM08bU7tPvFdhOzwAIWme VUar5BgEqumPQMdvaSeArHqcl7suA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtledgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepuddufeejteevffehgfduhedthfdvteekieeuheef veevudetkeelueehgeduhefhnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucfkphepjeehrddujedvrddugedrudejnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrh drtghomh X-ME-Proxy: Received: from [192.168.1.4] (75-172-14-17.tukw.qwest.net [75.172.14.17]) by mail.messagingengine.com (Postfix) with ESMTPA id CC8EA240057; Thu, 24 Dec 2020 16:40:30 -0500 (EST) Subject: Re: Missing rows after migrating from postgres 11 to 12 with logical replication To: Lars Vonk Cc: pgsql-general@postgresql.org References: <4f884e1e-99fb-f29a-4ee6-f7c0fa039331@aklaver.com> <9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com> <5b0a4d0d-651e-dd4b-07c2-b66a3a0e68b3@aklaver.com> <916ca797-70a3-861f-b019-0d1f9a131b4a@aklaver.com> From: Adrian Klaver Message-ID: Date: Thu, 24 Dec 2020 13:40:30 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/24/20 12:24 PM, Lars Vonk wrote: > Well thanks for taking the time anyway. Indeed next time reduce the > parts is a good idea. > > I would still expect though that if a logical replica misses a WAL it > would stop replicating (and / or report an inconsistent state). I know > this is the case with binary replication (it stops replication). > As a last question, do you know if this is also the case with logical > replication as well, or is what happened here an "expected outcome" when > a logical replica misses a WAL? It is still not clear to me what of the process was complaining about the WAL. Without knowing that any answer as to what effect it had would just be pulled out of thin air. As to logical replication and WAL read this thread(I thought I remembered a previous discussion on this, took me a bit to pull it up): https://www.postgresql.org/message-id/CAGvVEFvq_VM9LhYPeu%2BUw__gEVvrBffGL%3DFO-88cZEp-35%2BarA%40mail.gmail.com > > Lars > > On Thu, Dec 24, 2020 at 5:52 PM Adrian Klaver > wrote: > > On 12/23/20 1:40 AM, Lars Vonk wrote: > > The full setup is: > > > > **Before: > > 11 primary -> 11 hotstandby binary > > > > **During migration > > 11 primary -> 11 hotstandby binary > >    | -> 12 new instance via logical > >            |-> 12 new replica via binary > > > > **After migration > > 12 primary > > |-> 12 replica via binary > > > > > > There are several moving parts here. I have to believe the problem is > related. Just not sure how to figure it out after the fact. The best I > can come up with is retry the process and monitor closely in real or > near real time to see if you can catch the issue. Another option is to > reduce the parts count by not running the binary 12 --> 12 replication > at the same time you are doing the 11 --> 12 logical replication. > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com