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)
The ALTER SEQUENCE redirect error happens because only the first instance of the old schema is replaced.
Manually run the ALTER SEQUENCE statements that have failed.
Code fix is being developed and will be released in a future version.