Re: SQL objects UNITs (was: Extension Templates S03E11)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Thom Brown <thom(at)linux(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL objects UNITs (was: Extension Templates S03E11)
Date: 2013-12-19 13:01:17
Message-ID: CA+TgmoZLAeNpg2w4TqsgVjBoQHD_EmdDW1RB_rZ0Bwh_x7pPrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 18, 2013 at 10:05 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Stephen Frost escribió:
>> * Dimitri Fontaine (dimitri(at)2ndQuadrant(dot)fr) wrote:
>
>> > Basically with building `UNIT` we realise with hindsight that we failed to
>> > build a proper `EXTENSION` system, and we send that message to our users.
>>
>> Little difficult to draw conclusions about what out 'hindsight' will
>> look like.
>
> I haven't been keeping very close attention to this, but I fail to see
> why extensions are so much of a failure. Surely we can invent a new
> "kind" of extensions, ones whose contents specifically are dumped by
> pg_dump. Regular extensions, the kind we have today, still wouldn't,
> but we could have a flag, say "CREATE EXTENSION ... (WITH DUMP)" or
> something. That way you don't have to come up with UNIT at all (or
> whatever). A whole new set of catalogs just to fix up a minor issue
> with extensions sounds a bit too much to me; we can just add this new
> thing on top of the existing infrastructure.

Yep.

I'm not very convinced that extensions are a failure. I've certainly
had plenty of good experiences with them, and I think others have as
well, so I believe Dimitri's allegation that we've somehow failed here
is overstated. That having been said, having a flag we can set to
dump the extension contents normally rather than just dumping a CREATE
EXTENSION statement seems completely reasonable to me.

ALTER EXTENSION foo SET (dump_members = true/false);

It's even got use cases outside of what Dimitri wants to do, like
dumping and restoring an extension that you've manually modified
without losing your changes.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2013-12-19 13:22:05 Re: SQL objects UNITs
Previous Message Robert Haas 2013-12-19 12:40:40 Re: preserving forensic information when we freeze