gprestore --redirect-schema error for ALTER SEQUENCE
search cancel

gprestore --redirect-schema error for ALTER SEQUENCE

book

Article ID: 384274

calendar_today

Updated On:

Products

VMware Tanzu Greenplum Greenplum Pivotal Data Suite Non Production Edition VMware Tanzu Data Suite VMware Tanzu Data Suite

Issue/Introduction

When using gprestore option --redirect-schema during the ALTER FUNCTION an error is encountered:

20241120:05:04:54 gprestore:gpadmin:<servername>-[ERROR]:-Error encountered when executing statement: ALTER SEQUENCE new_schema.name_of_function OWNED BY old_schema.name_of_function; Error was: ERROR: sequence must be in same schema as table it is linked to (SQLSTATE 55000)

Cause

The ALTER SEQUENCE redirect error happens because only the first instance of the old schema is replaced.

Resolution

Workaround

Manually run the ALTER SEQUENCE statements that have failed.

Fix

Code fix is being developed and will be released in a future version.