When granting privileges on an aggregate functions to a user, the GRANT will be missingĀ in backup using gpbackup.
For example, using the below statements to create an aggregate function and grant privileges to a user.
After running gpbackup, the GRANT statements will be missing in the metadata.sql, thus causing permission issue when the user needs to utilize the aggregate function after a restore.
CREATE AGGREGATE agg_prefunc(numeric, numeric) (SFUNC = mysfunc_accum, STYPE = numeric, COMBINEFUNC = mycombine_accum, INITCOND = 0 ); -- Grant privilege GRANT ALL ON FUNCTION agg_prefunc(numeric, numeric) TO role_aggregate2;