pg_dump and pg_restore between projects
How can I copy from one project to other?
I ran the command below to make the database dump:
pg_dump -h $HOST -p 5432 -U postgres -F c -b -v postgres -f db.backup
But when I tried to restore in other project, I got a lot of errors related to permissions:
pg_restore: creating EVENT TRIGGER "pgrst_drop_watch" pg_restore: from TOC entry 4830; 3466 16617 EVENT TRIGGER pgrst_drop_watch supabase_admin pg_restore: error: could not execute query: ERROR: permission denied to create event trigger "pgrst_drop_watch" HINT: Must be superuser to create an event trigger. Command was: CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop EXECUTE FUNCTION extensions.pgrst_drop_watch();
How can I make this copy if I can't set the postgres user as a superuser anymore?
I ran the command below to make the database dump:
pg_dump -h $HOST -p 5432 -U postgres -F c -b -v postgres -f db.backup
But when I tried to restore in other project, I got a lot of errors related to permissions:
pg_restore: creating EVENT TRIGGER "pgrst_drop_watch" pg_restore: from TOC entry 4830; 3466 16617 EVENT TRIGGER pgrst_drop_watch supabase_admin pg_restore: error: could not execute query: ERROR: permission denied to create event trigger "pgrst_drop_watch" HINT: Must be superuser to create an event trigger. Command was: CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop EXECUTE FUNCTION extensions.pgrst_drop_watch();
How can I make this copy if I can't set the postgres user as a superuser anymore?