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 1kARsE-0006an-9N for pgsql-admin@arkaria.postgresql.org; Tue, 25 Aug 2020 05:51:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kARsD-0004NK-7L for pgsql-admin@arkaria.postgresql.org; Tue, 25 Aug 2020 05:51:57 +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 1kARsC-0004ND-Vx for pgsql-admin@lists.postgresql.org; Tue, 25 Aug 2020 05:51:56 +0000 Received: from mout.gmx.net ([212.227.15.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kARsA-0000cD-CX for pgsql-admin@lists.postgresql.org; Tue, 25 Aug 2020 05:51:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598334710; bh=rA+r54ClnAeIwHEFPQoU2BDJEFNWvtb64mewABTMRXI=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=VCujLB6u4GNZnTkdouN+87S8ShBoO+E0ih6BCJdP68JZAv0B7DiKuR4i85mELijn1 qBrqjHowMD7cY+nLi/qAKyvQ1Ln76dFqlCvq6u3uDozB/CSEMIBNRSoLKd0wik55fx 7kPEFCG3fIW9FfgnVobVgUgykhc7+3wsxntFysuo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.1.35.214] ([185.40.248.10]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmUHj-1ksY7D2Mcb-00iXox for ; Tue, 25 Aug 2020 07:51:50 +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> From: Thomas Kellerer Message-ID: <86ce53d9-5b46-d652-78d4-2bdac368a6b0@gmx.net> Date: Tue, 25 Aug 2020 07:51:50 +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: <6d2d142f-58b4-d2db-b271-700182b68b55@gmx.net> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:tWa69PwQoncBc0rVWystcTW0+s+uT1xdtOHYvFbCmeMbhG3mLte wdFHOzHe7LCVZj9/UKH6140LBS9Y7lKJTAR9MltQrPCOkwMYY41Q6MDDleHLI6mouVbcby4 Xn6/+ZHFgWREduqMkE6ebiwDvLef4zuMfSThNZwosKG+y7CBt3VZDRv3Ev5T7s62b3nuczr PxkSVF8jH6IYhJ+nYNevA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:2OPk11oFG7g=:2DRBcMEypWQaCM2/q70VfM OkaD/NxycFQHwh+mAvimldd7TGTd1KE4Bql1hDPVcC4XWxtb9jYBTgJuBrc/z9u20Al3yRtkF Ut+WTlLAG7B/BQBrV3RWl4b5BLsm7QIZn+O8dGHaTXzAC3qU7WztXDwq1DBsf8Vmwj0cgGKXd 0u7fQJAdVaBLYg6zY7uWMFe6OL0B5wAKM8t0xwgZNpLoYy96U452a+Fv1GhPJXWYbTx4mK1ZE cPU83e+8/IF79BrXqrizht/vAfwKai0k0xJ4LmOQgglrEHK3f5YNQ+B/OP4KOzLxBcGFA63O2 ++6DyFOumHhKVp0PeGH4CgiVlqWpDsCgWTnEwvG4nB8hNXkLQY0kgUhskr16bvXQgovWO2DED B4HrcWrqYDchYIJfhNQMo+LHQ57UzIfeATAWKhvZMicWA1G3xrfV/h2OhNkboQUbqX5Pb1CQa Dj45ThW1fZj9msP9VflnZInp6A6IBtysBWRKj/unl5sGGk1difm/L0s9cdWFvrYf0RGTAj+Lo 8J1M99AQvbF9empfngxhSUhHdY0SMzXCLn6yGY6wPordMCgQkxAmMLAzYivqOGb44xDC6phoe udD0/sEslItkkGtLbAn9S6bCHAAZXaI8pyw3xwuqZ8s8OlSny/rutfT/KgrfJJz0LwD2JuPr4 qQCjTxuYI1vadA2/WKcysjo6T5vqQZDy+sh+1lpcPkFGfRBPPbcvhe24Eurbh3u7z8lJl1ild qRh000qo1pPpOuQVCLi1QJqNrj3l/PUV53ipsdxo7s2v77YHkILuIzfq04YoS8ruaBIU178tL NHjvjlHO+7b7hik4vdSVat0w835LkjHo/I8Ketu/G+4v310awzwJ02sh8BehB/CRQ9aHjcpKG rvvLvlgE/hYUP8PX2PHPYNzRlPbKTMZOxQuPeyvUH9yVcjrNlAYRKLXJjdM/9SYMmmRS+G6JN bjSxczdY0jhM8M/Dt6dEH8mKkV9d6Yp+t9KjwdiExy7jlz54PQyDiCbyo9GKxpUGxlRIeqzsi CAbPI/XoAe+VV5M+YbVl6oblvmWoaoHbujiYzLQTszh5EOrkVA6nWY86F+Xnxh2eCOsaXxcxn L6ZmgR9tdo1x9cqrOWbFmGq0GO6YGWHalFPyZ0FsKv8RJzIXQp9T2i80wDtLEmV//rNRRvBl4 mkDK2tIilv45GtQvjmH9ZnF0ld0PGFjSZTZAXckilw6d6Oka9tZIHuVTPPH7rCdhNd/NKPAhS xtIcrig1Qn9KZmwTE List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Kellerer schrieb am 25.08.2020 um 07:32: > we have a a logical replication from Postgres 11 to Postgres 12. > > We did some structural changes to the published tables. The changes > to the subscriber where applied about 60 minutes later then those on > the publisher. Obviously before the subscriber's tables where synced > the replication failed. > > But even though the tables are now completely identical, the subscriber = still claims: > > logical replication target relation "public.employee" is missing som= e replicated columns > > I double checked multiple times that the tables are now identical by > doing a diff of the "pg_dump -s" outputs - they are identical in the > CREATE TABLE part. > > The table is listed with state "r" (ready) in pg_subscription_rel > > How can I find out which columns it thinks are missing? And how do I > convince the subscriber that the tables *are* identical? This is getting stranger: I dropped the table from the publication. After refreshing the subscription the error is still shown in the logfile = even though that table shouldn't be replicated any more. Is it possible that the error message mentions an unrelated table? How can I find out which table really causes the problem? Thomas