Re: ALTER EXTENSION UPGRADE, v3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER EXTENSION UPGRADE, v3
Date: 2011-02-11 15:16:01
Message-ID: 28166.1297437361@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Feb 11, 2011 at 9:00 AM, Dimitri Fontaine
> <dimitri(at)2ndquadrant(dot)fr> wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> I still think you might be over-designing this. Upgrading from the
>>> pre-extension world doesn't need to be elegant; it just has to work.
>>
>> Allow me to disagree here.

> Sure, but we're talking about adding core code to accomplish two things:
> 1. Avoid the need for packagers to ship one empty file.
> 2. Possibly, allow the operation to be completed in one command instead of two.

The empty file might not be a big deal, but I think that the user
experience *is* a big deal. For the vast majority of users, dealing
with an upgrade for some contrib module they are already using will
be their first experience with the extension mechanism. If it's awkward
or requires them to think about strange concepts like "null versions",
it's going to leave a bad taste in their mouths. Furthermore, I
confidently predict that some people will screw it up by issuing only
the first CREATE and not the second ALTER, leaving them with a database
that still works but not in the intended fashion; from which we will get
bug reports, perhaps years later.

I agree it's a bit annoying to expend effort on something that will have
only a one-shot use in any one installation, but to my mind this is an
important "fit and finish" issue. For analogy, some might think that
all the effort we spend on message translatability is overkill, but
I think it contributes to a good user experience.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-02-11 15:27:11 Re: ALTER TYPE 2: skip already-provable no-work rewrites
Previous Message Stephen Frost 2011-02-11 15:02:29 Re: Add support for logging the current role