Re: pg_dump doesn't dump new objects created in schemas from extensions - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: pg_dump doesn't dump new objects created in schemas from extensions
Date
Msg-id CAB7nPqTW-m5+H0E_BuMaN1=6Go4vbP1xhz4gbiXf3TMdNSchcg@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump doesn't dump new objects created in schemas from extensions  (Martín Marqués <martin@2ndquadrant.com>)
Responses Re: pg_dump doesn't dump new objects created in schemas from extensions  (Martín Marqués <martin@2ndquadrant.com>)
Re: pg_dump doesn't dump new objects created in schemas from extensions  (Martín Marqués <martin@2ndquadrant.com>)
List pgsql-bugs
On Sat, Jun 18, 2016 at 2:21 AM, Mart=C3=ADn Marqu=C3=A9s <martin@2ndquadra=
nt.com> wrote:
> El 17/06/16 a las 03:35, Michael Paquier escribi=C3=B3:
>> On Fri, Jun 17, 2016 at 4:21 AM, Mart=C3=ADn Marqu=C3=A9s <martin@2ndqua=
drant.com> wrote:
>>> IMO, this assignment:
>>>
>>>                 tbinfo->dobj.dump =3D tbinfo->dobj.namespace->dobj.dump=
_contains;
>>>
>>> should be replaced by a call to some new function which would be more
>>> or less a copy of selectDumpableNamespace, but without the
>>> checkExtensionMembership call.
>>
>> Ah, I see. Yes this is definitely wrong. The namespace itself may be
>> part of an extension but we do not check for it at all. See for
>> example the patch attached that is giving what I would expect is the
>> correct behavior.
>
> This is a new version of your patch that checks for schema inclusion or
> exclusion.
>
> If there are no complains, I could apply similar changes on other
> objects for a more complete patch.
>
> Thoughts, objections?

Tests, and refactoring.

As this is going to be heavily duplicated, you may want to use a
different routine for this check. Integrating some tests with a dummy
extension that creates a schema would also be a good idea as this is
likely going to modify many code paths. So I think that we should have
something stored in src/test/modules that gets installed when running
make check in src/bin/pg_dump, and then one of the TAP scripts in t/
creates a bunch of objects on the schema created by the extension.
--=20
Michael

pgsql-bugs by date:

Previous
From: "Albin, Lloyd P"
Date:
Subject: Re: BUG #14197: ERROR: character with byte sequence 0x81 in encoding "WIN1252" has no equivalent in encoding "UTF8"
Next
From: Martín Marqués
Date:
Subject: Re: pg_dump doesn't dump new objects created in schemas from extensions