On Fri, 27 May 2011 15:20:39 -0400 (EDT) Max Pyziur pyz@brama.com wrote:
Greetings,
While restoring one of my drupal-related databases, I get the following error/warning messages:
ERROR: permission denied to set session authorization ERROR: must be owner of schema public
How did you create the DB?
The restore process is issued from a command line:
psql drupal1 < drupal1.out
What user are you using to perform this command?
Why didn't you use pg_dump/pg_restore?
Did you remember to create the DB user on the pg cluster?
During restore pg is trying to execute
SET SESSION AUTHORIZATION $username; the username you're connecting with psql if username doesn't have ownership of public schema.
I think that if that command fail you're going to create all the object in the DB with the wrong ownership... and that may be a problem.