Re: Extensions, this time with a patch

From: David Fetter <david(at)fetter(dot)org>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extensions, this time with a patch
Date: 2010-10-13 16:15:05
Message-ID: 20101013161505.GA11546@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 13, 2010 at 11:36:02AM -0300, Alvaro Herrera wrote:
> Excerpts from David Fetter's message of mié oct 13 11:27:56 -0300 2010:
> > On Tue, Oct 12, 2010 at 08:57:09PM +0200, Dimitri Fontaine wrote:
>
> > > - Extension Upgrading
> > >
> > > Should this be done by means of 'create extension' or some other
> > > command, like 'alter extension foo upgrade'? The command would
> > > run the SQL script again, which would be responsible for any
> > > steps the extension author might find necessary to run.
> >
> > As people will want to up- or downgrade extensions to a particular
> > version, this should probably be something more like ALTER EXTENSION
> > ... SET VERSION [version number | LATEST | PREVIOUS ]... or something
> > like that.
>
> Does this mean that the control file should contain a version number in
> the filename? Otherwise, I don't see how you'd have more than one
> version of the control file.

Excellent idea!

> Also, if upgrading is necessary, there will need to be one "upgrade"
> control file that says how to upgrade from version N to N+1.

This, too, is an excellent idea.

> I don't think we should really support the downgrade case. It has
> the potential to get too messy -- and for what gain?

I think there should be something extension authors should be able to
provide for the downgrade case, given that an upgrade could cause a
system-wide failure.

Unfortunately, the extensions not provided with a downgrade option are
the ones likeliest to need it. Authors who write and test downgrade
code are much less likely to have their upgrades cause such failures
in the first place, but there's not much to do about that.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-13 16:15:23 Re: leaky views, yet again
Previous Message Dimitri Fontaine 2010-10-13 16:08:43 Re: SQL command to edit postgresql.conf, with comments