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 1krSe2-0005mK-GB for pgsql-general@arkaria.postgresql.org; Mon, 21 Dec 2020 21:23:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1krSe1-0003hn-8m for pgsql-general@arkaria.postgresql.org; Mon, 21 Dec 2020 21:23:05 +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 1krSe0-0003gh-78 for pgsql-general@lists.postgresql.org; Mon, 21 Dec 2020 21:23:05 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krSdw-0000DF-CB for pgsql-general@postgresql.org; Mon, 21 Dec 2020 21:23:03 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 8D8A4A5C; Mon, 21 Dec 2020 16:22:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 21 Dec 2020 16:22:58 -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=8 xsDpmK9u4HWlVUUWb+U1v8SVSms6Eztmdqsx5ODexU=; b=DR6ujOC2FIIHsvUAd j5LKYXfC+GAzlJVMIpqYjatRUxuffM1tDe7owx7JGGdO6PcoN0PjHVMtytCLKB7C H7ejDUhMm8X9e1r0pSnEWl1Zn8+1ciLQgjRbYE2DBlVNpKl/L+vu+uCiqNSP51LI ic1tS/1VyySppa2i5JJNAVdmI3rnlL/l2SZ0asf2Zpjtym/xzO0YWxpf536C5ebs ZJl6wZ/HciEt4ukf7hAMe/gc/5rDIjd5fyT3HbwFdA5NLxnbGVtxwHoprleuTCTn +RoqKB3JgH7mEHX4JqwXaLMwr2DYTqTc5uVseuk5rh9TBrvt2rQQpoqunVMBJ3gk UoIuQ== 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=8xsDpmK9u4HWlVUUWb+U1v8SVSms6Eztmdqsx5ODe xU=; b=opT8INuhH9Ts+8K7WfyOfxQYB/UwtK9YW/DC/W5qY0xZELPgzQ8BuvQev AeAukgA1yApW4qySSf5aMGGiy4P32t58C/iSI98DdGXWdxWhoIE59KUadKVdvBhp NByj3wxCP4JRVidYFUgO6Qxfh9CZq0hDZwSGO2dHnZwmpsLDIQDSuravnvTgocPq nn69BlnX3E4GOCxsleBzseZiAPpV213OO26F7gs8R0eMNwQn8elET8fm/RftkkMM uCvQmhYAc/7nb+o0sQQiBBKZw6Z3RbWpsf0sH/VaIZ9Bd0eoOAHvRWrXq2ujtYpG zf1V5M7KvLudo+XITc1H0SnMpCNQg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtvddgudehvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepteejvdetffejuedvleeifeefheeutdfhgfdvhffh hfekvdduveegvdejudefgfevnecukfhppeejhedrudejvddrudegrddujeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhm 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 820DB108005F; Mon, 21 Dec 2020 16:22:57 -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> From: Adrian Klaver Message-ID: <9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com> Date: Mon, 21 Dec 2020 13:22:56 -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: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/21/20 12:26 PM, Lars Vonk wrote: > Hi Adrian, > > Thanks for taking the time to reply! > > 2) Are the logs still available for inspection to see if there where > any > errors thrown? > > > Yes, and we dug into those. And we also found some indications that > something went wrong. > > 4) How did you determine the rows where missing? > > > We were alerted by a bug later that day and found that some rows were > missing in the new primary. We did a compare based on primary key and > found that several tables were missing rows. Before the switch we > unfortunately only checked max(id) and did some counts on tables and > those all checked out. We didn't do a count on all tables... > > So to come back at the logs: > > We dug a little deeper and we did found ERROR logs around the time we > ran the initial copies. During a period of several hours that day we see > a couple of messages like: > > ERROR: requested WAL segment 00000001000001F10000001D has already > been removed What was being run when the above ERROR was triggered? > > Regards, > Lars > > On Sun, Dec 20, 2020 at 6:58 PM Adrian Klaver