Re: Foreign servers and user mappings versus the extensions patch

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Foreign servers and user mappings versus the extensions patch
Date: 2011-02-07 09:37:54
Message-ID: 87y65s2nil.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sat, Feb 5, 2011 at 5:41 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Currently, the extensions patch considers that foreign data wrappers,
>> foreign servers, and user mapping objects can all be parts of extensions.
>> This is slightly problematic for pg_dump, where somebody decided to take
>> a shortcut and not implement user mappings using the full DumpableObject
>> infrastructure.  That could be fixed, but I'm wondering whether it's
>> worth the trouble.  I can see the point of writing an FDW as an
>> extension but it's a lot harder to see why either foreign server or user
>> mapping objects would ever be part of an extension.  So it might just be
>> best to remove those two object types from the set that can be managed
>> by an extension.
>>
>> Comments?
>
> I agree it's probably not that useful to make a foreign server or
> foreign user mapping part of an extension, but I'd rather not have us
> fail to support it just because we can't think of a use case right
> now. So my vote would be to fix it.

I would have though that it could allow you to distribute internally at
the system level the user mappings and server details, then have a DBA
install it without exposing them the password or other details. Well, I
don't recall offhand what you see as a superuser in the system view, but
that could be a use case.

Other than that, I confess I added the support just to try at being
exhaustive.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Huxton 2011-02-07 09:59:32 Re: A different approach to extension NO USER DATA feature
Previous Message Vaibhav Kaushal 2011-02-07 09:28:23 Where the Quals are actually 'List'ed