Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkdJ1-0004fU-Va for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Aug 2017 21:35:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dkdJ1-0003ZT-G5 for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Aug 2017 21:35:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dkdIz-0003YE-Cc for pgsql-bugs@postgresql.org; Wed, 23 Aug 2017 21:35:17 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dkdIv-00029R-U8 for pgsql-bugs@postgresql.org; Wed, 23 Aug 2017 21:35:15 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 765DE21064; Wed, 23 Aug 2017 17:35:12 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Wed, 23 Aug 2017 17:35:12 -0400 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-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=8ZLfMZwlf9iPNOAEsPWxVVxvuhwBKssq/BgGuV+I/60=; b=D+a7D7XZ a4bFo1MNPFqVSx52HSVM0SsXgWGQ+TGP03hiTTlx8fSbGVDR/DJRfzHAQvOzG9Ts qVW08kZmaRucL4a78Wb5IvjBrULK2jeDx0HDnTFP7nqU+VVED0cUUffdF0HhHL/p qOjhu+/6jkSCRHD0bAiIm94vpWUqsm7Esi0ihxWstkOLyFnIc6ps/L+KGIriekV9 DXFW6PAG7fYiWfgd2SzjxB99tuKN70QZ9BuKpgdhqr8kQct9Hza1/iw+OSG26Gpv SlenO7SeOu6QQQIQk/IGevn8vUop9pThjHCsYnhSwdB6yUiNWFMNvbkTK+B0guif A1sH5CrURXR3Kw== X-ME-Sender: X-Sasl-enc: tP4WKRgVbH6q4cAS8neArHmUjGuVd3Owc/qGtRyMtkYi 1503524112 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 05B897FA7B; Wed, 23 Aug 2017 17:35:11 -0400 (EDT) Subject: Re: BUG #14785: Logical replication does not work after adding a column. Bug? To: Andres Freund References: <20170820191720.1454.19868@wrigleys.postgresql.org> <14aeb673-fded-e9dd-9e90-f04908f9eadf@2ndquadrant.com> <20170822193418.drjntpluvcidfqyf@alap3.anarazel.de> <4dfb4e26-9542-85d6-ff61-9e7080796b0e@2ndquadrant.com> <20170823163151.5dankkw7z72ltmvw@alap3.anarazel.de> Cc: yxq@o2.pl, pgsql-bugs@postgresql.org From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <020d1ec1-70d6-a4e9-f7f6-ab7eed8f5985@2ndquadrant.com> Date: Wed, 23 Aug 2017 17:35:11 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170823163151.5dankkw7z72ltmvw@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 8/23/17 12:31, Andres Freund wrote: > This is "known" behaviour - this is the actual data WAL logged :(. Table > rewrites generate these pg_temp* tables and log the data there... Hmm, I see. Possibly, one way a user could recover from this is to add the column on the subscriber, rename to table on the subscriber to the temp name, then wait until all the changes from the rewrite are applied, at which point it should start complaining in the logs that the original table name does not exist, then rename the table back. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs