In the gprestore_YYYYMMDD.log ;
GRANT ALL ON FUNCTION schema01.myprocedure() TO schema; Error was: ERROR: schema01.myprocedure() is not a function (SQLSTATE 42809)
In gpbackup_metadata.sql
$ grep schema01.myprocedure gpbackup_20250129203009_metadata.sql CREATE PROCEDURE schema01.myprocedure() AS ALTER PROCEDURE schema01.myprocedure() OWNER TO schema01; REVOKE ALL ON FUNCTION schema01.myprocedure() FROM PUBLIC; REVOKE ALL ON FUNCTION schema01.myprocedure() FROM role01; GRANT ALL ON FUNCTION schema01.myprocedure() TO PUBLIC; GRANT ALL ON FUNCTION schema01.myprocedure() TO role01; GRANT ALL ON FUNCTION schema01.myprocedure() TO user;
The permissions are revoked and granted on a "FUNCTION" instead of a "PROCEDURE".
Procedures were introduced in Greenplum DB 7.x. When gpbackup creates the DDL for procedure and it's permissions, it creates "GRANT xx ON FUNCTION TO yy" statements instead of "GRANT xx ON PROCEDURE TO yy".
The backup does not consider the new keyword PROCEDURE and column "prokind" in pg_proc table to generate the correct ACL statements.
Currently, in January of 2025, a fix is in development and will be released in a future maintenance release of Greenplum Backup and Restore package