drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
24.43k stars 641 forks source link

[BUG]: permission denied for view pg_buffercache #2796

Open tomas-correia opened 3 months ago

tomas-correia commented 3 months ago

What version of drizzle-orm are you using?

0.32.1

What version of drizzle-kit are you using?

0.23.1

Describe the Bug

When opening Drizzle Studio on the browser, the following error appears on the page:

Error: permission denied for view pg_buffercache

Expected behavior

For the Drizzle Studio web page to load.

Environment & setup

Here is the bug context: bug-report.zip

RomanNabukhotnyi commented 2 months ago

@tomas-correia Hey! What user are you using to connect?

tomas-correia commented 2 months ago

Hi there. Sorry, what do you mean "what user"?

RomanNabukhotnyi commented 2 months ago

@tomas-correia I mean the user in the database connection string

tomas-correia commented 2 months ago

@tomas-correia I mean the user in the database connection string

Are you asking like what's the username, or what kind of permissions it has?

If the latter, here is what DBeaver says:

image

By the way, I should add that I've used Drizzle Studio for a long time and it always worked. It was just this one day it suddenly started giving this error. So this user worked totally fine, and I don't think I changed anything.

This is also a database managed by a PaaS (Clever Cloud), so I don't have a lot of freedom to mess with permissions, if that's what you're going to ask.