0

with a postgres 11.2 database with multiple database object owners and trying to use the following command as the database owner (not the postgres superuser):

pg_dump -h hostname -p 5432 -U dbownername dbname --file= dbname_20200406.pg_dump --no-owner --no-privileges --format=p

it fails due to object ownership not being all the same. (I have tested that this is the case by changing all ownership to dbownername and at that point pg_dump succeeds)

is the only way to get this to work is to run it as the postgres superuser? or are there postgres roles that I can give dbownername to allow them to back up... with out in effect making them another postgres superuser?

asked Apr 6, 2020 at 16:34

1 Answer 1

0

If you grant SELECT privileges to all tables to the database owner you should be able to export at least the tables. If not, please give full error message(s).

answered Apr 6, 2020 at 16:48
1
  • ah, thanks. at least one of the tables didn't have proper permissions on it. Commented Apr 6, 2020 at 17:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.