Re: Extension Packaging

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Peter van Hardenberg <pvh(at)pvh(dot)ca>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, Marko Kreen <markokr(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Subject: Re: Extension Packaging
Date: 2011-05-17 16:51:14
Message-ID: F934F897-52A1-40E4-BECB-6BC30965DC59@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On May 17, 2011, at 9:44 AM, Peter van Hardenberg wrote:

> My apologies for wading in out of the blue here as a first time poster with big demands, but allow me to briefly state my hopes without trying to be too proscriptive about particular mechanisms.

You are not alone, I assure you. :-)

> My hope here is that the extension model should eventually enable me to offer the ability for non-superuser databases to specify by some mechanism the extensions that they require in a reproducible fashion, enabling my users to recreate their local development conditions on a production cluster.

Yeah. Right now I believe this can only be done for extension that don't require a super user. And IIRC, all C-based extensions require a super user.

> My particular worry, and I apologize if I have misunderstood the thrust of this thread, is that "extension version" might not be tied to the "extension revision", and so I will not be able to determine whether or not all existing extensions are already at a specific version.

Well, nothing has happened in that regard. It's too late for 9.1, and there wasn't consensus, anyway. So right now, the installed extension version is the installed extension version. There is, however, no indication of any meaning or order to versions. They're just strings of text.

> The precision of this process is very important to me. My intended use case for this feature is to allow users to specify the versions of extensions that they need in some kind of a control file or in a database migration script such that they can then install those extensions on various new systems in a reliable and reproducible way.

This is do-able.

> David, if you do what you propose, haven't I already lost?

No. I was suggesting that there be some sort of function, pg_extension_version($ext_name), that would return the version and the revision. Combined they would equal the version you're interested in. I'm not thrilled with this approach, though, and it's not there, so for now we have the wild west of versions.

So for now, what you want (modulo permissions issues) is what's there, IIUC.

Best,

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-05-17 17:19:17 Re: DOMAINs and CASTs
Previous Message Peter van Hardenberg 2011-05-17 16:44:31 Re: Extension Packaging