0

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
CurlyError
  • 305
  • 2
  • 15
  • 1) You need to check the existing privileges/owner on the `pg_prewarm` extension functions. That would be `pg_prewarm()`, `autoprewarm_start_worker()` and `autoprewarm_dump_now()`. 2) Then verify that the user you are running the `GRANT`s as has the necessary strength to change the privileges on the functions. – Adrian Klaver Apr 30 '23 at 16:10

0 Answers0