Wednesday, June 19, 2013

Autopex: PostgreSQL extension installation magic

Autopex is the brainchild of a long night at the Royal Oak. It ties together Pex and event triggers to magically download and build any extension that you install. So after you have set everything up you can do, say, CREATE EXTENSION plproxy, and it will transparently download and build plproxy for you. (Actually, this only works if the extension name is the same as the package name. I'm planning to fix that.)

Note 1: You can't install Autopex via Pex, yet.

Note 2: I guess the next logical step would be Autoautopex, which installs Autopex and Pex automatically somehow. Patches welcome.

I suppose with logical replication, this might actually end up installing the extension code on the replication slaves as well. That would be pretty neat.

4 comments:

  1. From the readme: "The package description files are (normally) in a Git repository, by default cloned from https://github.com/petere/pex-packages."

    Do we really need yet another package repository for PostgreSQL extensions? Why not use PGXN?

    ReplyDelete
    Replies
    1. Because not everything is on PGXN, PGXN is full of uncontrolled junk, and you can't have a fork or private version of PGXN.

      Delete
    2. "Not everything is on PGXN" is a silly argument for creating a new repository that has even fewer extensions. :) It's been there for just over 2 years, give it time.

      Sure, the ability to add custom packages and restrict which extensions can be installed makes sense, particularly for something like Autopex. But that's not mutually exclusive with supporting PGXN.

      I think it's counterproductive for the community to fragment the extension landscape.

      Places like CPAN, PyPI and RubyGems are "full of uncontrolled junk" too, but they are so powerful because they are the authoritative source for everything. It's a proven model.

      Delete
    3. Well, I think you are wrong, and Pex fills a niche that is currently not served by anything else. But this is not the place to discuss that.

      Delete