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 1krmDk-0000JV-AK for pgsql-general@arkaria.postgresql.org; Tue, 22 Dec 2020 18:17:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1krmDj-0001Ae-9Q for pgsql-general@arkaria.postgresql.org; Tue, 22 Dec 2020 18:17:15 +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 1krmCf-0004Ln-PK for pgsql-general@lists.postgresql.org; Tue, 22 Dec 2020 18:16:10 +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 1krmCa-00017H-6L for pgsql-general@postgresql.org; Tue, 22 Dec 2020 18:16:09 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id A514066D; Tue, 22 Dec 2020 13:16:01 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 22 Dec 2020 13:16:01 -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=f ytxxTWh7e3gLgUlUUXwWWIE6deFdthI6P/AAThPgNk=; b=fZsZIPAoWFMVIb9eS qipWL5p6rzlO+Mh7J/ERshSLczldB5YskQnD+UOfbGxL0QETTKtMZT91vgmGfllj XT8wi0JnqEaLE17diifg/XoPrnhuxqFcPVF5hAvJQmLINCGYS7WzcaPHTpM2fT9l oKoHjHLtURPekYxbKnddJVGhqCdJ2qm5/17dQZatAyO/6k7P3b796F0dJMOmlJmo mFKDOmFT0WE66BwtvB4H6jdweEtGuXwYNv/P9KssQqvxpY2ni2imugWI3W0UT63w YSF4Dau6U+HmvkJYFPwXH/8syrIg0jcVDqZ4PQXAzvJDEse2Zfs7JG3TpRgs3RC7 8lXUg== 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=fytxxTWh7e3gLgUlUUXwWWIE6deFdthI6P/AAThPg Nk=; b=p5dgRA18qxszUS15hjFlu1585oy2gPUGC5ZcYYDiA93019mZWRPXfknte hf9uAQhYXY/awVNfDaLp37sd2jw6WQ9BKZWAKjsGsp0JPpVFR0OVOx6E/cZgR97t y1aDLyxGJr5ds5N5CjOYVCl/mODlKhiI0NUCGOKguymFN82GhBBZ2rA4Gq59QA1T jomnuhOjvNJOCEErTOHruxLOzwXHk341kbFFNQbK2XnwfvUtrGjZbSLmXvRp+bDH e8kEPabr/KwQNAE9neO/JVF8rMGS9qN00ZB13gogsUGa3JbByEllQpwHVNuaGB4s fk3CsFJ7nIcXO5+CZLgBEhJvxodLw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtgedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepveevfeevfeeugeffkeekhfegieeufffgteeujedv gffhueejjefhkeejleegtdegnecukfhppeejhedrudejvddrudegrddujeenucevlhhush 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 7AFDC1080066; Tue, 22 Dec 2020 13:16:00 -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> From: Adrian Klaver Message-ID: Date: Tue, 22 Dec 2020 10:15:59 -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/22/20 9:10 AM, Lars Vonk wrote: > Did you have some other replication running on the 11 instance? > > > Yes the 11 instance also had another (11) replica running. (But these > logs are from the 12 instance) The 11 instance had the data that went missing in the 12 instance, so what shows up in logs for the 11 instance during this period that is relevant? > > The new 12 instance also had a replica running. So the setup was?: 1) 11 primary --> 11 standby via what replication logical or binary? | --> 12 new instance via logical 2) 12(new) primary --> 12(?) standby via what replication logical or binary? > > In any case what was the command logged just before the ERROR. > > > There is nothing logged. > > These are the only log statements just before the error message, one > second later the ERROR is logged: > > 2020-12-10 13:26:43 UTC::@:[5537]:LOG:  checkpoints are occurring too > frequently (20 seconds apart) > 2020-12-10 13:26:43 UTC::@:[5537]:HINT:  Consider increasing the > configuration parameter "max_wal_size". > 2020-12-10 13:26:43 UTC::@:[5537]:LOG:  checkpoint starting: wal > > Lars > > On Mon, Dec 21, 2020 at 11:51 PM Adrian Klaver > > wrote: > > On 12/21/20 2:42 PM, Lars Vonk wrote: > >     What was being run when the above ERROR was triggered? > > > > > > The initial copy of a table. Other than that we ran select > > pg_size_pretty(pg_relation_size('table_name')) to see the current > size > > of the table being copied to get a feeling on progress. > > > > And whenever we added a new table to the publication we ran ALTER > > SUBSCRIPTION migration REFRESH PUBLICATION; to add any new table > to the > > subscription. But not around that timestamp, about 50 minutes > before the > > first occurence of that ERROR. (no ERRORS after prior ALTER > SUBSCRIPTIONs). > > > > But after the initial copy's ended there are more ERROR's on > different > > WAL segments missing. Each missing wal segment is logged as ERROR a > > couple of times and then no more. After a couple of hours no > errors are > > logged. > > Something was looking for the WAL segment. > > Did you have some other replication running on the 11 instance? > > In any case what was the command logged just before the ERROR. > > > > > Lars > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com