2016-08-24 17:01 GMT-03:00 Martín Marqués <mar...@2ndquadrant.com>:
> 2016-08-24 11:15 GMT-03:00 Stephen Frost <sfr...@snowman.net>:
>> Michael,
>> * Michael Paquier (michael.paqu...@gmail.com) wrote:
>>> The patch attached includes all those tests and they are failing. We
>>> are going to need a patch able to pass all that, and even for master
>>> this is going to need more thoughts, and let's focus on HEAD/9.6
>>> first.
>> Are you sure you have the tests correct..?   At least for testagg(), it
>> looks like you're testing for:
>> GRANT ALL ON FUNCTION test_agg(int2) TO regress_dump_test_role;
>> but what's in the dump is (equivilantly):
>> GRANT ALL ON FUNCTION test_agg(smallint) TO regress_dump_test_role;
> Yes, that was the problem there.
>> I've not looked into all the failures, but at least this one seems like
>> an issue in the test, not an issue in pg_dump.
> I see the other 12 failures regarding the CREATE INDEX that Michael
> reported but can't quite find where it's originated. (or actually
> where the problem is)

OK, I see where the problem is.

Indexes don't have a selectDumpableIndex() function to see if we dump
it or not. We just don't gather indexes from tables for which we are
dumping their definition:

                /* Ignore indexes of tables whose definitions are not
to be dumped */
                if (!(tbinfo->dobj.dump & DUMP_COMPONENT_DEFINITION))

This means we have to perform the same change we did on
selectDumpableNamespace for selectDumpableTable, and also assign the
correct value to dump_contains, which is not set there.

The problem will come when we have to decide on which indexes were
created by the extension (primary key indexes, other indexes created
by the extension) and which were created afterwards over a table which
depends on the extension (the test_table from the extension).

Right now, I'm in an intermediate state, where I got getIndexes() to
query for the indexes of these tables, but dumpIndexes is not dumping
the indexes that were queried.

I wonder if we should have a selectDumpableIndexes to set the
appropriate dobj.dump for the Indexes.

Martín Marqués                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to