Published on

Fixing Prisma PostgreSQL Permission Issue with PolyScale.ai

Authors

We've recently talked about PolyScale.ai and how easy it is to set up a cache for any relational database almost instantly.

However, when we try to use it with Prisma (PostgreSQL) we might be getting permission issues.

Like this:

Error: P1010: User `postgres` was denied access on the database `postgres.public`

It is because of a security mechanism called Channel binding which ensures that the client and server are connected without a middleman.

However, in our case, PolyScale cache needs to be a middleman to facilitate database caching and so we need to disable it to make it work with Prisma.

We can do so by appending channel_binding=disable in our database connection string.

Something like this:

DATABASE_URL=postgresql://janedoe:mypassword@psedge.global:5432/mydb?schema=sample&application_name=CACHEID&channel_binding=disable

Happy fixing permissions!