Pivotal Knowledge Base

Follow

Greenplum Error: No Schema Has Been Selected To Create In

Environment

 Product  Version
 Pivotal Greenplum   All
 MADlib

 All

 OS

 RHEL 6.x

Symptom

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 ~]$ 

Cause 

It was found that the public schema was needed in order to create the function successfully.

Resolution

The workaround in getting the MADlib installation or upgrade to run successfully is to recreate the public schema.

Execute the steps to recreate the public schema.

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=#

2. Recreate the public schema with the below command:

testdb=# CREATE SCHEMA public;
CREATE SCHEMA

3. Retry the install or upgrade of MADlib. 

Comments

Powered by Zendesk