Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwuTF-0000UP-Pq for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Sep 2017 18:20:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dwuTF-0008N9-7q for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Sep 2017 18:20:37 +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 1dwuSW-00073U-U0 for pgsql-bugs@postgresql.org; Tue, 26 Sep 2017 18:19:53 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dwuST-00038C-U7 for pgsql-bugs@postgresql.org; Tue, 26 Sep 2017 18:19:51 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4EB012134B; Tue, 26 Sep 2017 14:19:48 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Tue, 26 Sep 2017 14:19:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=JLZW+x0VO/zMyzVSMX pbrZFMEeqVI6DKKD5frCtlqPY=; b=mMpZB80r2VhgdKWM60O3tL8ajT1I8aWDAP +VJ4lyRrTXU8XuTOt+L7jCw/fEpxmC0mZHW7LKFUWCFojZsSWOp++wkew+aT/CSM L+/huqIjViVYcCHQdQcaUSgtdAi0jcne2lDY49JWX6B/nfjZhZEh2NWWCdwWUDvv KSq2IJLWsZQvtdDjQAOjMo6Zz+wEosx5KKNHrrPK3m4fLJuPD1Qy/LwQSCl3IRek 06/QSXMYQS6vpgfyc0HvU3FVTOMwpsSSWv0d1hYqOMrJSQdXrbq/L0UD13tbIwX8 sdPCZeSEFBmJ4p4WzMlj8Sh8YLaE3J0t7+hANOfGiXc9rU6VOZmw== X-ME-Sender: X-Sasl-enc: x01LXT/qCdZSGolDzyBNHfoHB5jrbonYN9ClIeLycphD 1506449987 Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id E82532471C; Tue, 26 Sep 2017 14:19:47 -0400 (EDT) Date: Tue, 26 Sep 2017 11:19:47 -0700 From: Andres Freund To: Tom Lane Cc: Stephen Frost , Peter Eisentraut , yxq@o2.pl, pgsql-bugs@postgresql.org Subject: Re: BUG #14785: Logical replication does not work after adding a column. Bug? Message-ID: <20170926181947.2slrmvpiqvlbtxej@alap3.anarazel.de> References: <4dfb4e26-9542-85d6-ff61-9e7080796b0e@2ndquadrant.com> <20170823163151.5dankkw7z72ltmvw@alap3.anarazel.de> <020d1ec1-70d6-a4e9-f7f6-ab7eed8f5985@2ndquadrant.com> <20170823213949.g7wpurzt6hbi3e5h@alap3.anarazel.de> <20170925191655.xcn3tsnuibep3jro@alap3.anarazel.de> <073783f4-ccf0-65d8-ffa2-01d339958978@2ndquadrant.com> <11184.1506440634@sss.pgh.pa.us> <20170926155633.GM4628@tamriel.snowman.net> <32004.1506449841@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32004.1506449841@sss.pgh.pa.us> 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 2017-09-26 14:17:21 -0400, Tom Lane wrote: > Stephen Frost writes: > > * Tom Lane (tgl@sss.pgh.pa.us) wrote: > >> This patch is using the wrong approach entirely. Every other place in > >> the backend that is trying to exclude temp relations uses a test on the > >> containing namespace, not the relname. > > > The specific issue here is that the new pg_class entry is created in the > > same namespace, not in the temp one. The commit mentions make_new_heap() > > specifically because that's where the issue is coming from because > > that's creating this new pg_temp_XXX table in the regular user > > namespace. > > Um ... but that transient relation should never be visible to any other > backend, because we delete it before committing. If there is someplace > where this is not the case, then we need to change that, because it'll > break everything else that scans pg_class, such as VACUUM. This is accessed during logical decoding, for filtering purposes. Because outputting all those rewritten rows for a temp relation isn't helpful, rather to to the contrary. Obviously it'd be better if we'd some nicer infrastructure, but that seems like something for v11+. > In short: this code is unlike every other similar check in the backend. > I find it unlikely that this is right and all the others are wrong. I don't think those checks are comparable. Greetings, Andres Freund -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs