Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwuR4-0000Hd-0h for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Sep 2017 18:18:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dwuR2-000728-Hv for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Sep 2017 18:18:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dwuQK-0005nT-MH for pgsql-bugs@postgresql.org; Tue, 26 Sep 2017 18:17:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dwuQD-0002xH-9u for pgsql-bugs@postgresql.org; Tue, 26 Sep 2017 18:17:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v8QIHLNK032005; Tue, 26 Sep 2017 14:17:21 -0400 From: Tom Lane To: Stephen Frost cc: Peter Eisentraut , Andres Freund , yxq@o2.pl, pgsql-bugs@postgresql.org Subject: Re: BUG #14785: Logical replication does not work after adding a column. Bug? In-reply-to: <20170926155633.GM4628@tamriel.snowman.net> References: <14aeb673-fded-e9dd-9e90-f04908f9eadf@2ndquadrant.com> <20170822193418.drjntpluvcidfqyf@alap3.anarazel.de> <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> Comments: In-reply-to Stephen Frost message dated "Tue, 26 Sep 2017 11:56:33 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32003.1506449841.1@sss.pgh.pa.us> Date: Tue, 26 Sep 2017 14:17:21 -0400 Message-ID: <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 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. 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. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs