Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwsII-000815-4Y for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Sep 2017 16:01:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dwsIH-0008Uj-F3 for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Sep 2017 16:01:09 +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 1dwsIG-0008UJ-PN for pgsql-bugs@postgresql.org; Tue, 26 Sep 2017 16:01:08 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwsI8-0008Us-3E for pgsql-bugs@postgresql.org; Tue, 26 Sep 2017 16:01:08 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id DA9865F795; Tue, 26 Sep 2017 12:00:58 -0400 (EDT) Date: Tue, 26 Sep 2017 12:00:58 -0400 From: Stephen Frost To: Tom Lane 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? Message-ID: <20170926160058.GN4628@tamriel.snowman.net> References: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TnAE83xysjOrLzvn" Content-Disposition: inline In-Reply-To: <20170926155633.GM4628@tamriel.snowman.net> User-Agent: Mutt/1.5.21 (2010-09-15) 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 --TnAE83xysjOrLzvn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Tom, * Stephen Frost (sfrost@snowman.net) wrote: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: > > Peter Eisentraut writes: > > > On 9/25/17 15:16, Andres Freund wrote: > > >> This'll accept tablenames like pg_temp_1foo, right? Might be worth > > >> being a bit narrower in the test. > >=20 > > > Committed with that change. Thanks. > >=20 > > 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. >=20 > 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. And, to be clear, the new table also doesn't necessairly have RELPERSISTENCE_TEMP either. Really is pretty ugly how make_new_heap() operates, it seems... Thanks! Stephen --TnAE83xysjOrLzvn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZynm6AAoJEO1sijiDR2RVzHoQAIg4rsEfTuSRLtO6O5VbbiwM dEDdJIodSUqE+5hz/NWD/TMS0llXcEcv+vzxYPFs2v7t2x6FAAgugLO+G4AfkmZO yjq76ETL1pZ3YP2q6nGwjy6sF3OSXhX0HMh7i0BLaYSC5o3ncFeFmUx7SRGpPHBx 91pHLCWWBih6tFp5mmx0/3EBz4RIXu2muTo66U0cnqhHt6RcR/eOGZnvu+i9Tfdl +BAUFd42A3i4lTYfsa8J3Dn2WnyHLkJyC0s43gHtl4kspXbevt8c8iJNCEN38H3O /z6NYrOVtGtr0WWd+wcVv+a3dopsclxap+20+2xvjZ5obcBVw+7j8TaRA+Q93TxO O/vegLQf17mEZgESh+JDO7t2XWtx33SGIRQnuNenFOiCj+oH3KhhKKaeQJtfCiVi 1/RCx+zckDGYv0KdwZmNQNlBrc7b2wR1+k88o36LITrsYJugUwa89DP7dMMZYTAf c6cxd2PGEKDkrHFoQ76mnjo+lHehT3dQPgRbo1Tz7BWS7vQYasO1h4J75RSfPmXZ 4roWQIrn8jE2O9xouECNRMHmyssCVqlcQTS2atc63UvqYkKYOHn7lA1fd5G9aknc VaZ25d3jZgdcu1oGahSSLKnmdkxkp2UXpm/lt8kqPDlTve6Z9/hjTUMLbsgjsYHb jZ5kKfdn16TeZdz31qWy =DYZl -----END PGP SIGNATURE----- --TnAE83xysjOrLzvn--