Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUO6N-0008LV-66 for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jan 2017 01:34:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cUO6M-000105-FO for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jan 2017 01:34:50 +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 1cUO5h-0000Gl-8G for pgsql-bugs@postgresql.org; Fri, 20 Jan 2017 01:34:09 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUO5d-0002Nj-BY for pgsql-bugs@postgresql.org; Fri, 20 Jan 2017 01:34:08 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 46C715F796; Thu, 19 Jan 2017 20:33:04 -0500 (EST) Date: Thu, 19 Jan 2017 20:33:04 -0500 From: Stephen Frost To: Michael Paquier Cc: Daniele Varrazzo , pgsql-bugs Subject: Re: pg_dump 9.6 doesn't honour pg_extension_config_dump for sequences Message-ID: <20170120013304.GZ18360@tamriel.snowman.net> References: <20170118142443.GZ18360@tamriel.snowman.net> <20170118144537.GA18360@tamriel.snowman.net> <20170119134640.GN18360@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pRIGWEjU0Bw92Zdr" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 20:29:27 up 195 days, 2:53, 2 users, load average: 0.11, 0.11, 0.09 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -5.1 (-----) 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 --pRIGWEjU0Bw92Zdr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Michael Paquier (michael.paquier@gmail.com) wrote: > On Thu, Jan 19, 2017 at 10:46 PM, Stephen Frost wrot= e: > > Yeah, that looks like the right answer and matches how dumpTableData > > handles this, which is also why that's working correctly. > > > > I don't particularly like this arrangement though. This works because: > > > > getTables() will create the entry for the sequence and call > > selectDumpableTable(), which calls checkExtensionMembership(), which > > will set the dump flags to ACL | SECLABEL | POLICY, and then > > getTableData() will skip adding a data entry for it because DATA isn't > > set, allowing processExtensionTables() to add the DATA entry later for > > config tables/sequences. >=20 > Yes, I certainly agree with that. When looking at this bug the first > thing I did was to set DUMP_COMPONENT_DATA in > checkExtensionMembership() this way actually to see that nothing > happened. Nothing happened..? getTableData() should have then created an entry for it and then dump it out.. If that didn't happen then I'm kind of curious as to why not. > It would be also better to have a sanity check like > (tbinfo->obj.dataObj !=3D NULL && (tbinfo->dump & DUMP_COMPONENT_DATA) > !=3D 0) in both the sequence and table data dump paths, and use tbinfo > instead of tdinfo to do this work. This way we check the dependency > between the DATA flag set and the created dataObj by > makeTableInfoData(). Well, yes, if we go the route that I suggested and make the tbinfo actually have the DATA component set for these objects by checkExtensionMembership(). We can't set that kind of a sanity check now, of course. > Thanks. There are still no tests for dumpable tables though. Agreed. I have a whole slew of additional regression tests slated for the src/bin/pg_dump/t/ set of tests, I wouldn't complain if someone wanted to work through adding more regression tests to src/test/modules/test_pg_dump/t/ for extensions... Otherwise, I'll get there once I've gotten the code coverage of pg_dump *without* worrying about extensions up to something more reasonable. Currently there are far too many cases that aren't covered (as evidenced by the current rate of bug-fix back-patching that I'm doing..). Thanks! Stephen --pRIGWEjU0Bw92Zdr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYgWjPAAoJEO1sijiDR2RVifsP/1y1OPq848KukhIVPIRrlQXq ktfKHJ7bTyUs9AfK6SY8/2J9bfbwjnChFrgbPPCTFYRuVXa9jUowvwBfFfcawRtK IfxE2cUJUBH0tcXjssZnrj/8bN/fGYeBBWa2AUkRkF+UgJJYtBugfEjZrJVoO7St 6P+0Fm1ks7q9EVtNER8H3qQjc6sErY/yH7vxdQPmfSKeK3NIYz4/ybLHw+cPI2vP FdICMnDcBXmVN2Ul7+ws0dmgo/9RmckgigD/PxfIcCPR8YZmsfOyrgT40vVw8TOz TZJpGAflC8zkqjgYyd4JvWALP/cJYo/a9V9Y60Glw6uKPvk0PLyTsv7Jo5nvcZOJ L/b8B6DnEKx4ccgLqNpPSiQMWPCKcnAF7mFxn5nOpHmlCykir+WrfKYBnp6shgNt PxZZc3rLn29nH9WYBZotIFkjyDMw+6+ndo3g0bO2zpjgDoVqXHU7Tw9WCbXY66tQ Ph7enY5EiqIEdBChcXgFcEWW1i5FfVasvKkfMS67lVch8vYfbyPSouWi20cOSXoM yUdSQ0aeRSM89tPgWS7YeGAwi9WJuQcN65tRF83F8KeUS6wxf3I/75MHCuCTMCG3 5z0o+t0UJq/x7cydkNJwKMG/XXqFoMRvtqbJ7GvgQiYao/UoEs/l4mXo0PyjCfPr x6kl4HSJpLEqJwou1ST0 =YMlc -----END PGP SIGNATURE----- --pRIGWEjU0Bw92Zdr--