0

When I try to take PostgresDump (AWS RDS) the following error I am getting:

ERROR:  permission denied for relation dms_stats_detailed
pg_dump: error: query was: LOCK TABLE table_name IN ACCESS SHARE MODE

I am having admin permission though (with Master User).

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • Can you please share more info? How are you taking the dump? Via console or cli? If cli then what use you are logged on to? – Raj Verma Sep 01 '20 at 08:25
  • also can you please share the pg_dump command that you are using, i'm suspecting there is not a mentioned of user while taking the dump. – Raj Verma Sep 01 '20 at 08:32
  • "pg_dump -h rajtestpg12.something.test-east-2.rds.amazonaws.com -U test -f test.sql testdb" when I do this, it works just fine for me. check if you are missing any of the params above. – Raj Verma Sep 01 '20 at 09:01

1 Answers1

0

You need to run pg_dump with a database user (the -U option) that has permission to read the tables you are dumping.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263