From: Stephen Frost <sfrost@snowman.net>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: pg_dump 9.6 doesn't honour pg_extension_config_dump for sequences
Date: Thu, 19 Jan 2017 20:33:04 -0500
Message-ID: <20170120013304.GZ18360@tamriel.snowman.net> (raw)
In-Reply-To: <CAB7nPqTa06qucDHqqRgkFVOD9asa0u2DogMVO6uU+XisYYRMuQ@mail.gmail.com>
References: <CA+mi_8ZmxQM7+nZ7pJ8uyfxc9V3o=UAG14dVqvftdmvw8OJ3gQ@mail.gmail.com>
<20170118142443.GZ18360@tamriel.snowman.net>
<CA+mi_8aV8-yyj6ZUpGF+G7Gkuevu6hPEZZQnpU=+Oia3eNSkUw@mail.gmail.com>
<20170118144537.GA18360@tamriel.snowman.net>
<CAB7nPqSqpvmoa5Rwk84sRnwu4vEfvUkCiG0UYkx5e=WEKeOz+Q@mail.gmail.com>
<20170119134640.GN18360@tamriel.snowman.net>
<CAB7nPqTa06qucDHqqRgkFVOD9asa0u2DogMVO6uU+XisYYRMuQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
* Michael Paquier (michael.paquier@gmail.com) wrote:
> On Thu, Jan 19, 2017 at 10:46 PM, Stephen Frost <sfrost@snowman.net> wrote:
> > 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.
>
> 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 != NULL && (tbinfo->dump & DUMP_COMPONENT_DATA)
> != 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
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: sfrost@snowman.net, michael.paquier@gmail.com, daniele.varrazzo@gmail.com
Subject: Re: pg_dump 9.6 doesn't honour pg_extension_config_dump for sequences
In-Reply-To: <20170120013304.GZ18360@tamriel.snowman.net>
References: <CA+mi_8ZmxQM7+nZ7pJ8uyfxc9V3o=UAG14dVqvftdmvw8OJ3gQ@mail.gmail.com> <20170118142443.GZ18360@tamriel.snowman.net> <CA+mi_8aV8-yyj6ZUpGF+G7Gkuevu6hPEZZQnpU=+Oia3eNSkUw@mail.gmail.com> <20170118144537.GA18360@tamriel.snowman.net> <CAB7nPqSqpvmoa5Rwk84sRnwu4vEfvUkCiG0UYkx5e=WEKeOz+Q@mail.gmail.com> <20170119134640.GN18360@tamriel.snowman.net> <CAB7nPqTa06qucDHqqRgkFVOD9asa0u2DogMVO6uU+XisYYRMuQ@mail.gmail.com> <20170120013304.GZ18360@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox