Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFlrC-0002Wn-4e for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Jun 2016 17:22:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bFlrB-00009V-Fw for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Jun 2016 17:22:29 +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 1bFlqW-0007rC-T5 for pgsql-bugs@postgresql.org; Wed, 22 Jun 2016 17:21:48 +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 1bFlqT-0004s0-Go for pgsql-bugs@postgresql.org; Wed, 22 Jun 2016 17:21:48 +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 u5MHLgIi004194; Wed, 22 Jun 2016 13:21:42 -0400 From: Tom Lane To: =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= cc: Stephen Frost , Michael Paquier , Alvaro Herrera , PostgreSQL mailing lists Subject: Re: pg_dump doesn't dump new objects created in schemas from extensions In-reply-to: References: <409fe594-f4cc-89f5-c0d2-0a921987a864@2ndquadrant.com> <20160616185547.GA72247@alvherre.pgsql> <24a4d9cf-025d-d855-fe76-3af3f878174d@2ndquadrant.com> <29478.1466605967@sss.pgh.pa.us> <20160622145349.GK21416@tamriel.snowman.net> <30842.1466608326@sss.pgh.pa.us> Comments: In-reply-to =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= message dated "Wed, 22 Jun 2016 14:05:32 -0300" Date: Wed, 22 Jun 2016 13:21:42 -0400 Message-ID: <4193.1466616102@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) 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 =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= writes: > On HEAD I actually see that we *are* setting dump_contains as well: > if (fout->remoteVersion < 90600) > dobj->dump = DUMP_COMPONENT_NONE; > else > dobj->dump = ext->dobj.dump_contains & (DUMP_COMPONENT_ACL | > DUMP_COMPONENT_SECLABEL | DUMP_COMPONENT_POLICY); Uh, what? (BTW, Stephen, what's the point of the version check here? The 'else' code seems like it would work just fine in all branches.) >> So maybe just moving the checkExtensionMembership call to after the other >> stuff would be enough in HEAD? > Looking into older versions as well I can't see how placing > checkExtensionMembership at the end of selectDumpableNamespace would > help. (like-wise for other selectDumpable's) The fix in HEAD will necessarily look quite a bit different from the back branches, I fear. But the idea I had in mind there was that we'd calculate a namespace's dump and dump_contains flags as if it were not an extension member, and then allow checkExtensionMembership to overwrite the dump flags if it is a member. Since checkExtensionMembership doesn't touch the dump_contains flags, that would leave all the flags in the desired state. 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