pgsql-io / multicorn2

http://multicorn2.org
Other
73 stars 16 forks source link

Howto build multicorn2-pg14 as a standalone extension #14

Closed coleman-rik closed 2 years ago

coleman-rik commented 2 years ago

All of the current documentation describes building PostgreSQL, either from source or via oscg/io, and creating the multicorn2 extension in that installation of PostgreSQL.

How would one build/install the multicorn2 extension so that it can be used by existing PostgreSQL 14.x installations?

Thanks.

ShaheedHaque commented 2 years ago

These are the steps I used on Ubuntu. If you can test (or adapt and test to your platform), I will work to update the docs.

  1. Install prerequisites needed to build Postgres server extensions:
    # For Ubuntu 22
    sudo apt install -y build-essential ...(let me know what extras you needed)
    sudo apt install -y postgresql-server-dev-14
  2. Download & Compile Multicorn2:
    # Get the version of interest
    wget https://github.com/pgsql-io/multicorn2/archive/refs/tags/v2.3.tar.gz
    tar -xvf v2.3.tar.gz
    cd multicorn2-2.3
    make
    sudo make install

    Note that the last step installs both the extension into Postgres and also the Python part. As of #13, the latter is done using "pip install", and so can be undone using "pip uninstall".

luss commented 2 years ago

Thanks for the great answer Shaheed. Multicorn2 can also, of course, be built in an EL7, EL8, or EL9 environment. As well as for Ubuntu 18.04 and 20.04. The second step is always the same and in fact it is generic for all PG extensions.

luss commented 2 years ago

The build process is documented in the lower half of the README.md for this project