0

I have remote database server and I have different roles and users. for example I have database test and schema test_schema and table test1.

I am connected to the database using test_user and I am querying the table like below.

select * from test_schema.test1

It works fine sometime and some time it fails with below error.

InsufficientPrivilegeError: permission denied for schema test_schema

Here the actual problem is inconsistency of the error, if it does not have permission why it works some time?

Additional info:

  1. using python3
  2. using asyncpg
Awaish Kumar
  • 537
  • 6
  • 22
  • 1
    I’d say best way to look into this is first get all the permissions on that schema/schemas. Then make sure your driver is not causing the problem and is the latest one. Not sure of you are using psycopg or a different one. Do share the effective permissions from the db. I’m suspecting its the driver or otherwise the async library. See how it works when you use psycopg driver. – Raj Verma Aug 31 '20 at 16:34
  • You should probably report this as a bug at their issues page - [here](https://github.com/MagicStack/asyncpg/issues). This error seems very strange. Are you sure your error response if for the right db user? Is your async code alright? – clamentjohn Sep 19 '20 at 03:41

0 Answers0