Re: pg_dump with tables created in schemas created by extensions

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Martín Marqués <martin(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump with tables created in schemas created by extensions
Date: 2016-08-29 07:51:09
Message-ID: CAB7nPqQX2-2JdVHE02s3s42oQpC-J71qDMs0HdWfGeEH8g4d8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 27, 2016 at 8:15 AM, Tomas Vondra
<tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
> On 08/27/2016 12:37 AM, Tom Lane wrote:
>> =?UTF-8?B?TWFydMOtbiBNYXJxdcOpcw==?= <martin(at)2ndquadrant(dot)com> writes:
>>> Looking at this issue today, I found that we are not setting a
>>> dependency for an index created inside an extension.
>>
>> Surely the index has a dependency on a table, which depends on the
>> extension?
>>
>> If you mean that you want an extension to create an index on a table
>> that doesn't belong to it, but it's assuming pre-exists, I think
>> that's just stupid and we need not support it.
>
> I don't see why that would be stupid (and I'm not sure it's up to us to just
> decide it's stupid).

Like Tomas, I am not really getting this opposition..

> I see the current behavior is documented, and I do understand why global
> objects can't be part of the extension, but for indexes it seems to violate
> POLA a bit.
>
> Is there a reason why we don't want the extension/index dependencies?

I think that we could do a better effort for indexes at least, in the
same way as we do for sequences as both are referenced in pg_class. I
don't know the effort to get that done for < 9.6, but if we can do it
at least for 9.6 and 10, which is where pg_dump is a bit smarter in
the way it deals with dependencies, we should do it.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-08-29 07:53:34 Re: [PATCH] Transaction traceability - txid_status(bigint)
Previous Message Michael Paquier 2016-08-29 07:42:41 Re: Missing checks when malloc returns NULL...