Databasus read-only user cannot be added with Postgres 15+ without public schema #208

Closed
opened 2026-04-05 16:15:58 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @johndevs on 1/18/2026

I cannot add a PG database to Databasus because the database does not have a public schema.

When you try to add the database, you will see:

failed to grant connect privilege: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02)

In the postgres server logs you will see:

schema "public" does not exist

The default fallback behavior of Databasus here will report the error.

Creating a database read-only user should not depend of if the database has a public schema or not.
In my case I have a database with multiple schemas with multiple users owning those schemas and no public schema.

I would suggest to add to the dialog where the databasus user is created an option to provide which schemas the user will have access to. By default it can still be only the public schema but please allow users to change it.

*Originally created by @johndevs on 1/18/2026* I cannot add a PG database to Databasus because the database does not have a public schema. When you try to add the database, you will see: > failed to grant connect privilege: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02) In the postgres server logs you will see: > schema "public" does not exist The default fallback behavior of Databasus [here](https://github.com/databasus/databasus/blob/main/backend/internal/features/databases/databases/postgresql/model.go#L498) will report the error. Creating a database read-only user should not depend of if the database has a **public** schema or not. In my case I have a database with multiple schemas with multiple users owning those schemas and no public schema. I would suggest to add to the dialog where the databasus user is created an option to provide which schemas the user will have access to. By default it can still be only the public schema but please allow users to change it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/databasus#208