From: | Daniel Farina <daniel(at)heroku(dot)com> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Inline Extension |
Date: | 2012-01-20 23:33:12 |
Message-ID: | CAAZKuFabAH=LsvM_D7v2faQNeA_5f-Vh1Q98OvqEmCBHybR+2g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 20, 2012 at 2:48 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Even if you give the version number in the CREATE EXTENSION command, it's by
> convention that people actually maintain a sane versioning policy. If people
> don't take version management seriously, you will quickly end up with five
> different versions of an extension, all with version number 0.1.
Projects are taking it seriously, and invest a lot of effort in it.
There is no shortage of schema versioning frameworks, of varying
levels of maturity....but some are quite complete by the standards of
their users. However, there is little knowledge shared between them,
and the no database gives them much support, so idiosyncrasy becomes
inevitable.
Unless one makes loading regular, unpackaged operators via SQL
impossible (which is, on the face of it, doesn't sound like a good
idea to me), the only people who will bother with CREATE EXTENSION
with inline content will be those who care and want to maintain
version control.
I stick to my original assessment: the ship has sailed, or perhaps,
more accurately, is sailing. Perhaps one could gain wisdom by
thinking of this problem differently: "I'm going to write a migration
tool to help developers in my framework or workflow deal with change,
and I really would like it if my database helped me by....".
I don't think we should fool ourselves that we'll be letting people
shoot themselves in the foot with regard to versioning if we give them
versions. People have been painfully and assiduously trying to avoid
version problems for some time now, with no help from the database,
and they do it entirely via pure SQL statements from Postgres' point
of view.
> Another approach is to use comments on the objects saying "version 1.23".
> Those generally move together with the objects themselves; they are included
> in pg_dump schema-only dump, for example, while the contents of a table are
> not.
Idiosyncratic, but perhaps useful for some people. Again, workarounds
are possible, and per my previous statements, even pervasive. That
doesn't make it a desirable thing to avoid assisting with.
> What is FEBE?
FrontEnd BackEnd Protocol, I thought? The one libpq speaks. Is there a
better name?
Here are some reasons not do this feature, in my mind:
* Is the world ready yet to think about versioning operators in a
database the same way software is versioned?
* Related to that: If the feature is written, it will have to be
supported. Does the feature have enough impact at this time?
* Do we know how to design the feature correctly so it will attract
use, especially as a Postgres-ism, which is related in some part to
the decaying importance (my perception) of 'database agnostic'
* Are the awkward user-land versioning strategies good enough? Would
it be better to focus elsewhere where things are even *more* awkward?
My assessment is: I know some people who would use this feature, but a
broad swathe are not loading too many operators into their database.
It's hard to know if that's because packaging operators in databases
has been so abysmally bad in the industry at large, or because the
choice of sandboxed languages are just not appealing for, say, a
Python or Ruby developer to write things that are not a series of SQL
statements, ala pgsql, and a lot of that (sans triggers) can be done
over the wire anyway. Maybe embedded Javascript can help with this,
but it's not the Here and Now.
If I had to invest with complexity with regard to versioning, I'd
rather invest in Postgres being able to tell me a hashed version of
all or a controllable subset of the tables, types, attributes in the
database, as to quickly pick out drift between an freshly created
database (produced by the migrations on-disk against development) and
any cruft that sneaks into a production server that is thought to be
the same as the others. That would have huge impact with common use
cases at this very moment in time, so it provides a reasonable
backdrop to evaluate the cost/impact of the proposed feature.
--
fdr
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2012-01-20 23:54:13 | Re: gistVacuumUpdate |
Previous Message | Heikki Linnakangas | 2012-01-20 22:53:45 | Re: gistVacuumUpdate |