Permissions granted for AGGREGATE function missing in backup using gpbackup
search cancel

Permissions granted for AGGREGATE function missing in backup using gpbackup

book

Article ID: 296955

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

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; 


Environment

Product Version: 6.25

Resolution

This is a known bug in gpbackup 1.30.3 and below.
It is expected to be fixed in gpbackup 1.30.4 and later versions.