Re: ALTER EXTENSION UPGRADE, v3

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Florian Pflug <fgp(at)phlo(dot)org>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER EXTENSION UPGRADE, v3
Date: 2011-02-03 19:14:50
Message-ID: AANLkTim7-ZUy4kMJojxJjm2GLpPrvRSJCqGqYVA7UzU2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 3, 2011 at 2:02 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Thu, Feb 3, 2011 at 1:10 PM, David E. Wheeler <david(at)kineticode(dot)com> wrote:
>>> On Feb 3, 2011, at 10:07 AM, Tom Lane wrote:
>>>> Well, pg_upgrade is designed to work within a major-version series, eg
>>>> you could do a 9.1-to-9.1 upgrade if you needed to install a newer
>>>> version of an extension.  Admittedly, this is swinging a rather larger
>>>> hammer than "apply an upgrade script" would entail.
>
>>> Dude. That's a frigging piledriver!
>
>> That's putting it mildly.  It's more like sending a rocket into outer
>> space to tweak the orbit of a comet so that it crashes into your
>> barbecue grill to light a fire so you can roast marshmallows.
>
> No, it's more like using a sledgehammer to swat a fly because you don't
> have a flyswatter and aren't inclined to drive ten miles to buy one

In other words, it's something no sensible person actually does?

> It'll get the job done, and the added cost of building/maintaining a
> more finely calibrated tool may well outweigh the value.

It'll get the job done for very small values of getting the job done.
Let's suppose that version 2 of hstore comes out, improving on version
1 of hstore by adding one new useful function. Your proposed solution
is that this person should initdb a new cluster, shut down their
database, pg_upgrade over to the new cluster, and start it back up
again to get that function definition. What's actually going to
happen in 99.44% of cases is that the person is going to say "this
extension mechanism sucks" and create the function definition by hand,
because even if their database is unimportant enough that they don't
mind the downtime, that's a ridiculous amount of hassle for what ought
to be a straightforward operation. The reason for possibly postponing
this to 9.2 is not that it isn't necessary but that we might not yet
be sure what the best way to do it is.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2011-02-03 19:24:42 Re: [HACKERS] Slow count(*) again...
Previous Message Mladen Gogala 2011-02-03 19:09:35 Re: [HACKERS] Slow count(*) again...