Did not find any relation named "gp_toolkit.gp_bloat_diag_appendoptimized".
search cancel

Did not find any relation named "gp_toolkit.gp_bloat_diag_appendoptimized".

book

Article ID: 404684

calendar_today

Updated On:

Products

VMware Tanzu Data Suite VMware Tanzu Greenplum VMware Tanzu Greenplum / Gemfire

Issue/Introduction

You are getting below error for views.

db01=# \d+ gp_toolkit.gp_bloat_diag_appendoptimized

Did not find any relation named "gp_toolkit.gp_bloat_diag_appendoptimized".

db01=# \d+ gp_bloat_diag_appendoptimized

Did not find any relation named "gp_bloat_diag_appendoptimized".

db01=# \d+ gp_toolkit.gp_bloat_diag_appendoptimized

Did not find any relation named "gp_toolkit.gp_bloat_diag_appendoptimized".

db01=# \d+ gp_orphaned_backends

Did not find any relation named "gp_orphaned_backends".

Environment

Greenplum Database 6.29 and above.

Greenplum Database 7.4.0 and above.

Cause

Greenplum 6.29.0 and 7.4.0 introduce the following views and functions:

FUNCTION get_tablespace_version_directory_name()
FUNCTION gp_move_orphaned_files(target_location TEXT) 
FUNCTION gp_bloat_diag_appendoptimized(btdrelpages int, btdexppages numeric, OUT bltidx int, OUT bltdiag text)
VIEW gp_check_orphaned_files
VIEW gp_check_missing_files 
VIEW gp_check_missing_files_ext 
VIEW gp_orphaned_backends
VIEW gp_bloat_expected_pages_appendoptimized
VIEW gp_bloat_diag_appendoptimized
VIEW gp_bloat_estimates
VIEW gp_bloat_estimates_appendoptimized
VIEW gp_resgroup_bypassed_queries

In 6.29.0 and above they are introduced with the new extension "gp_check_functions". The Release Notes for Greenplum 6.x incorrectly states that some of the views and functions are in the "gp_toolkit" schema. They are all created in schema "public" when creating the extension.

In 7.4.0 and above the views and functions are available by default in the pg_catalog and gp_toolkit schemas. There is no need to create an extension in 7.4.0 and above.

Resolution

In 6.29.0 and above, to create the functions and views:

CREATE EXTENSION gp_check_functions;

If the extension already exists:

ALTER EXTENSION gp_check_functions UPDATE;