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 1kAU1C-0003ZI-Dl for pgsql-admin@arkaria.postgresql.org; Tue, 25 Aug 2020 08:09:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kAU1B-00040A-AS for pgsql-admin@arkaria.postgresql.org; Tue, 25 Aug 2020 08:09:21 +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 1kAU1B-000403-1D for pgsql-admin@lists.postgresql.org; Tue, 25 Aug 2020 08:09:21 +0000 Received: from mout.gmx.net ([212.227.15.18]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAU17-0004EF-Pj for pgsql-admin@lists.postgresql.org; Tue, 25 Aug 2020 08:09:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598342956; bh=Nlz9BEKOr+qwoImCkF6i9WHK6GZvjCZs7Jj44hHGtrI=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=XDJQRxXl9qRMvf0U7oeWmUjNXEJ0J2RiHNePAMOoJQq7IjF5nKS62yl0OXgFCjLRb HK/wxOc57lh+Uk8GpdPgCRaOuy4IyU22XlnXWbvP3HguOeJ61yjtTaFJtunfs09hp7 OoBb0w6S0u6SPOjjeA+62xnnEh8SJMnE/TOs+Co8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.1.35.214] ([185.40.248.10]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MMXUD-1jsX7s3Un9-00Je2M for ; Tue, 25 Aug 2020 10:09:15 +0200 Subject: Re: How to debug logical replication error "columns are missing" if they are not To: "pgsql-admin@lists.postgresql.org" References: <6d2d142f-58b4-d2db-b271-700182b68b55@gmx.net> <86ce53d9-5b46-d652-78d4-2bdac368a6b0@gmx.net> <3219941598335790@iva8-c4b4179e2e3a.qloud-c.yandex.net> From: Thomas Kellerer Message-ID: Date: Tue, 25 Aug 2020 10:09:15 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: <3219941598335790@iva8-c4b4179e2e3a.qloud-c.yandex.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:jkOr343aNvzbS1JoNFxY6Aq3Mtvh3oExv5w19I7o8PMNkby2Mbd RbrFa/aO3YoRmZfyCYLJe8nYJUmfJFYY914Tg3Jv1s8T8L1ipo6nuSalHQr9hbuOKqXdLqi FEATGJFpJXpdu2t8MEYirJ564mmntquX6kea+/ku0rsUtYODYpBxQFL8WGEZEpK2MMmIKNd /neljrMkl8U/QqfQYtDsw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:oRhqIPgZaVs=:vOmOLJA8sRW/wFyzJbovQ+ MG6JTyrdX7vXSIhPvRNLVFN8EP8oBJHjKvWzBXNUN4lNPnOYA0cp55W9fS5BjH56TdTiF/EVJ KXdXdoFECQ3bTDvgGquOkfILsGbUxJb/3Baha6PGE0DYZzXn21SbXfLd1hLWouE+8H72HNaDh s0taqaQvZDRjntjdRPhsaG6wic3nf0qZ6DLH3DemEUbVe4gCEAdVau5ZcGH9+9WDRuLFdJ1e2 mYm1m2LxN9PDx6amXqkB/mOgFWEwy8bIym9WLp82RVo7tYaZVToe4VcAEKKV1/iDrafuzCrYo 3aIky4KnTPR/KHajDP1Kgfs16FPjPJltyQz6nkNkhYeCGmP8IhrNpejqQGzrAkQ4fzP6eYKhZ YQg7jHtMc5/G0P85di+0scGH0broAILS6+MRGzM7uBasYPnISgsQQNe6sc6yckU7VKFxCFN17 XWu56xbC2rsgxGY86rteQVbmO7o+ArfrPCgrjbV7oLn83UpBZ8kEZVLz/2VU+q9S0MQi3h8K6 ZbFdjtVAppqRqZ9knza3PTlbiIyNyLxp8v7sOqtkkMME0K5hlKsG59M/FWIcYLF5yunMZ1Y9Y +YY1XeZX1HAvcvHXYmklLTpEzxqhmx6/jVWs33YT38RIm6K/J+jEMowzwPf4mGwRZnFmBRb/h ymMeqenG3AB7OSTH9P6J5av47m/QVbNmyBXtAy4aVcYSFEvpPTfXB3uFXulP1hpK0Y9Pi3chQ etDfDkfBk2p/3X79qMDLkZ/93OiyLUsxpZ6jjJP5+1tZjn1JnZ0RTG0+qKTNbDiIW4cX4wgYM XQ1ehdrjakJiYXDQfQMLhIQlF3DZNjaTt0GOtDE9Ig5pTNzvoInixUAcWsOm2rUG1cigXekUT Cb4v/VHiMgpjjOGkp7VJnupg7mVwvM+WzOxSzz19wWk7+/QsY9MzIXq3mcpCxuBwvi6y3ObnB Z278+aNYBCk1H6kiJLQkdRWZVbO3GswkdfrxDHRp+RkumMRplRQmNC9q/IzBZhgp0+CY3918w wmuSoxgagsm8CLS2dqXV7t7SUcHl9dzBTgBFfQTYPv0Nw8uZiJaf1+jQhxfkyuET13WvaMJ6h /r/opa2WNP3+QwcEl/deSdYVyeKbVLxSdTr98RCpoELZIemUdCWZmWzEsK/r954f1WFkcgoDC WhPk2rI7LtQJkXH9gv+5WYXqvP5Ut8dosDKYu5kj1q42hleziMqPTrC7L/qfI0O2WfZcrOdld QooHyArO+RjJdEWWt List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Samed YILDIRIM schrieb am 25.08.2020 um 08:09: > Have you dropped any column during or after main schema changes? > > If yes, you should add columns you dropped on publisher side to > subscriber side. These two tables can be identical now. But, if you > added a column to publisher, and then dropped it, and you never added > the column(s) on subscriber side, you would get error. Because, you > are looking current status of tables, but logs that should be > consumed and data that should be replicated belong to past. The change involved dropping two columns and adding a new one. But the dropped columns were already present on the subscriber The change essentially merged two date columns into a single daterange col= umn. So what would have been the correct approach here then? 1. Adding the new column on the subscriber 2. Let replication catch up 3. then drop the old columns on the subscriber Regards Thomas