Francisco Reyes <lists(at)natserv(dot)com> writes:
> Should restores be always done by the super user?
If every object in the dump is owned by the same nonprivileged user,
it will work to restore as that user. You can also use --no-owner
to get the same effect (everything winds up owned by the user running
restore). If you are trying to copy a database that includes objects
of varying ownership, though, you gotta start as superuser.
Now that I think about it, the standard dump sequence will attempt to
set permissions and comment on the public schema, which will fail if
you're not superuser. But it should be okay to ignore those errors.
regards, tom lane