Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 101

...

Currently supported database version: Postgres 9 and 10, Greenplum 4.3 and 5.X.

Anchor
Super Quick Start
Super Quick Start
Super Quick Start

To set up PostgreSQL + MADlib with Anaconda Python on OSX: 

Code Block
PYTHON=/Users/janedoe/anaconda/bin/python 
brew install postgresql --with-python
brew services start postgresql
— — Set up database and roles
— — Install the .dmg of latest madlib downloaded from MADlib website http://madlib.incubator.apache.org/download.html
/usr/local/madlib/bin/madpack -s madlib -p postgres install

Anchor
Quick Start With Binaries
Quick Start With Binaries
Quick Start With Binaries

Prerequisites

Install and configure your database of choice. MADlib currently supports the following platforms:

...

    • Postgres:

      Code Block
      languagebash
      /usr/local/madlib/bin/madpack -s madlib –p postgres install-check


    • Greenplum Database:

      Code Block
      languagebash
      /usr/local/madlib/bin/madpack –p greenplum install-check

      The above may need user/port/password setting depending on how the database has been configured. 

      Please note that if the optimizer_control GUC is set to off in Greenplum, the following install checks will fail, and these MADlib functions will not work:  decision tree, random forest, LDA , k-Means, PMML export for decision tree, PMML export for random forest.  This will be fixed in a future release (MADLIB-1109).  The parameter optimizer_control controls whether the server configuration parameter optimizer can be changed. The parameter optimizer controls whether the GPORCA optimizer is enabled when running SQL queries.

Anchor
PGXN
PGXN
Installing from PGXN (PostgreSQL)

Prerequisites

Requirements for installing MADlib:

  • gcc and g++ (For OSX, Clang will work for compiling the source, but not for documentation.)
  • m4
  • patch
  • cmake
  • pgxn installed
  • PostgreSQL (64-bit) 9.2+ with plpython support enabled. Note: plpython may not be enabled in Postgres by default.


Use below command to install and load the latest MADlib package uploaded on PGXN.  

Code Block
languagebash
pgxn install madlib
pgxn load madlib 

 If you see the following error, it's likely that you are using Parallel Execution flags for make. 

Code Block
languagebash
[ 86%] Performing build step for 'EP_boost'
Ignored: make
[ 86%] Performing install step for 'EP_boost'
Ignored: make
[ 86%] Completed 'EP_boost'
[ 86%] Built target EP_boost
make[1]: *** [all] Error 2
make: *** [all] Error 2
ERROR: command returned 2: make PG_CONFIG=/usr/local/pg10/bin/pg_config all

You can run this as a workaround:

Code Block
languagebash
MAKEFLAGS='-j1' pgxn install madlib
pgxn load madlib 


Anchor
Compile From Source
Compile From Source
Compiling From Source

Prerequisites

Requirements for installing MADlib:

...

  • To install:

    Code Block
    languagebash
    $BUILD_ROOT/src/bin/madpack -p postgres -c [user[/password]@][host][:port][/database] install


  • To make sure that the installation is successful:

    Code Block
    languagebash
    $BUILD_ROOT/src/bin/madpack -p postgres -c [user[/password]@][host][:port][/database] install-check


  • For more information on the usage of madpack:

    Code Block
    languagebash
    $BUILD_ROOT/src/bin/madpack --help


Anchor
Env variables
Env variables
Defining environment variables

The variables below will be automatically used by the madpack installer if no connection string is provided:

...

Code Block
languagebash
export PGPORT=5430
export PGHOST=127.0.0.1
export PGDATABASE=madlibtest
$BUILD_ROOT/src/bin/madpack -p postgres install

Anchor
Upgrading MADlib gppkg
Upgrading MADlib gppkg
Upgrading MADlib gppkg

  1. Download the MADlib binary

...

  • Greenplum Database:
    • Upgrading gppkg to a higher version of MADlib:
      For example, upgrading from 1.15.1 to 1.16

      on Redhat / CentOS run the following as gpadmin:

      Code Block
      languagebash
      gppkg -u <madlib_package_upgrading_to>

      Upgrade the MADlib deployment in the database

      Code Block
      languagebash
      madpack -p <platform> -c <connection> upgrade


    • Upgrading gppkg for the same version of MADlib:
      For example, upgrading from madlib_gppkg_1.16+1 to madlib_gppkg_1.16+2

      on Redhat / CentOS run the following as gpadmin:

      Code Block
      languagebash
      gppkg -u <madlib_package_upgrading_to>

      MADlib deployment in the database does not need to be upgraded as the MADlib version has not changed.

Anchor
Release Specific Installations
Release Specific Installations
Release Specific Installations

Sometimes there are release specific variations of the installation procedures.  These exceptions are listed in this section.

...