After I am running pg_restore
, I am trying to grant all privileges to the new user, with the following command order:
GRANT ALL PRIVILEGES ON DATABASE "my_database" TO "my_user";
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "my_user";
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO "my_user";
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO "my_user";
However, the last command, granding privileges on all function, is giving the following error:
WARNING: no privileges were granted for "pg_prewarm"
ERROR: permission denied for function autoprewarm_start_worker