Greenplum: Resolving Missing gp_toolkit Extension
search cancel

Greenplum: Resolving Missing gp_toolkit Extension

book

Article ID: 430793

calendar_today

Updated On:

Products

VMware Tanzu Data Suite VMware Tanzu Greenplum

Issue/Introduction

During database health checks or administrative tasks, the gp_toolkit schema/extension is found to be missing. This results in errors when attempting to query administrative views (e.g., gp_bloat_diag) or when running specific gpconfig commands that rely on the toolkit’s presence.

Environment

Greenplum Version 7

Cause

The gp_toolkit extension is typically installed by default. However, it may be missing if:

  1. The database was created using a custom template that lacked the extension.
  2. The extension was explicitly dropped.
  3. A major version upgrade occurred where extensions were not re-initialized in all target databases.

Resolution

To ensure all future databases have this extension and to fix the current missing instance, follow these steps to install it in template1 and your target database.

1. Install in template1

Installing here ensures that any new databases created after this point will automatically include gp_toolkit.

# Install the extension
psql -d template1 -c "CREATE EXTENSION IF NOT EXISTS gp_toolkit;"

 

2. Install in the Specific Database

If you have an existing production or dev database missing the tools, run the command directly against that database:

# Replace 'your_database_name' with your actual DB name
psql -d your_database_name -c "CREATE EXTENSION IF NOT EXISTS gp_toolkit;"

 

3. Verification

Confirm the extension is active and check the version to ensure compatibility.

psql -d template1 -c "SELECT extname, extversion FROM pg_extension WHERE extname = 'gp_toolkit';"

 

Additional Information

Important Notes

  • Permissions: You must have SUPERUSER privileges to run CREATE EXTENSION.
  • Search Path: If the extension is installed but you still get "relation not found" errors, ensure gp_toolkit is in your search_path.

Reference:

Tanzu Greenplum: The gp_toolkit Administrative Schema