Greenplum error: no schema has been selected to create in
search cancel

Greenplum error: no schema has been selected to create in

book

Article ID: 295623

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Symptoms:
When attempting an upgrade or install of MADlib, it fails with "ERROR: no schema has been selected to create in".


Error message

[gpadmin@mdw ~]$ $GPHOME/madlib/bin/madpack -v -s madlib -p greenplum -c gpadmin@mdw:5432/testdb install

madpack.py : INFO : Arguments: Namespace(command=['install'], connstr=['gpadmin@mdw:5432/testdb'], keeplogs=False, platform=['greenplum'], schema=['madlib'], testcase='', tmpdir='/tmp/', verbose=True)

madpack.py : INFO : Testing database connection...

madpack.py : INFO : Detected Greenplum DB version 4.3ORCA.

madpack.py : INFO : *** Installing MADlib ***

madpack.py : INFO : MADlib tools version = 1.9.1 (/usr/local/greenplum-db-4.3.10.0/madlib/Versions/1.9.1/bin/../madpack/madpack.py)

madpack.py : INFO : MADlib database version = None (host=mdw:5432, db=testdb, schema=madlib)

madpack.py : INFO : Testing PL/Python environment...

madpack.py : INFO : > PL/Python already installed

madpack.py : ERROR : SQL command failed:

SQL:

CREATE OR REPLACE FUNCTION plpy_version_for_madlib()

RETURNS TEXT AS

$$

import sys

# return '.'.join(str(item) for item in sys.version_info[:3])

return str(sys.version_info[:3]).replace(',','.').replace(' ','').replace(')','').replace('(','')

$$

LANGUAGE plpythonu;

ERROR: no schema has been selected to create in

madpack.py : ERROR : MADlib installation failed.

[gpadmin@mdw ~]$ 

Environment


Cause

A public schema is needed in order to create the function successfully.

Resolution

The workaround is to recreate the public schema using the following instructions:

1. Use psql to connect to the database that MADlib will be installed on:

[gpadmin@mdw ~]$ psql -d testdb
psql (8.2.15)
Type "help" for help.

testdb=#[gpadmin@mdw ~]$ psql -d testdb psql (8.2.15) Type "help" for help.  tes

2. Recreate the public schema with the below command:

testdb=# CREATE SCHEMA public;
CREATE SCHEMA

3. Retry to install or upgrade of MADlib.