PostgreSQL — pg_dump permission denied – LOCK TABLE

Check if the user running pg_dump has access to the tables.

For me, I had 2 tables owned by postgres instead of my usual user for some reason.

Check by going into psql, connecting to your DB, and typing \d

To change your table owner, type

ALTER TABLE tablename USER TO user;

One thought on “PostgreSQL — pg_dump permission denied – LOCK TABLE

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s