# ERROR: permission denied for table \<tablename\>

**URL:** <https://forums.percona.com/t/error-permission-denied-for-table-tablename/40684>\
**Category:** PostgreSQL General Discussion\
**Created:** [April 20, 2026, 2:09pm UTC](https://forums.percona.com/t/error-permission-denied-for-table-tablename/40684 "2026-04-20T14:09:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jruffer](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jruffer/32/16566_2.png) [@jruffer](https://forums.percona.com/u/jruffer)\
**Post date:** [April 20, 2026, 2:09pm UTC](https://forums.percona.com/t/error-permission-denied-for-table-tablename/40684/1 "2026-04-20T14:09:33Z")

</div>

grant select on all tables in schema schemaname to username;

I don’t unserstand what I’m missing.

---

<div class="post-metadata">

**Author:** ![Abhinav\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/abhinav_gupta/32/6262_2.png) [@Abhinav\_Gupta](https://forums.percona.com/u/Abhinav_Gupta)\
**Post date:** [April 20, 2026, 3:37pm UTC](https://forums.percona.com/t/error-permission-denied-for-table-tablename/40684/2 "2026-04-20T15:37:23Z")

</div>

Who is the owner of the table for which you are getting Permission denied?

```auto
SELECT tablename, tableowner
FROM pg_tables
WHERE schemaname = 'schemaname';

```

`\dp schemaname.tablename`  
`\dp schemaname.*`

Are you encountering this error with existing tables, or with tables created after the GRANT was applied?

---

<div class="post-metadata">

**Author:** ![jruffer](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jruffer/32/16566_2.png) [@jruffer](https://forums.percona.com/u/jruffer)\
**Post date:** [April 20, 2026, 3:38pm UTC](https://forums.percona.com/t/error-permission-denied-for-table-tablename/40684/3 "2026-04-20T15:38:45Z")

</div>

I think I was missing:  
grant usage on schema schemaname to username

Just waiting for the user to test.

---

<div class="post-metadata">

**Author:** ![jruffer](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jruffer/32/16566_2.png) [@jruffer](https://forums.percona.com/u/jruffer)\
**Post date:** [April 21, 2026, 9:28am UTC](https://forums.percona.com/t/error-permission-denied-for-table-tablename/40684/4 "2026-04-21T09:28:35Z")

</div>

User has confirmed that this has fixed it.
