Skip to content

serverpod cloud db user create says it creates a superuser, but the user can't change tables #5768

Description

@Zfinix

serverpod cloud db user create says it creates a superuser (Create a new superuser in the Serverpod Cloud DB.), and so do the Cloud database docs. The user it creates can read and write rows, and that's it. Superuser advice from elsewhere, like pg_restore --disable-triggers, then fails with permission errors that the word "superuser" doesn't explain.

Reproduction

Create a user with serverpod cloud db user create permcheck, connect, and run each statement inside BEGIN; ... ROLLBACK;.

Statement Result
SELECT rolsuper for the current user false (member of neon_superuser, tables owned by owner)
CREATE TABLE public.t (x int) permission denied for schema public
ALTER TABLE ... ADD COLUMN must be owner of table serverpod_auth_core_profile
ALTER TABLE ... DISABLE TRIGGER ALL must be owner of table serverpod_auth_core_profile
SET LOCAL session_replication_role = replica permission denied to set parameter "session_replication_role"
INSERT, UPDATE, DELETE, sequence UPDATE allowed

Suggested fix

Call it a database user in the db user help text (create, list, and delete all say superuser), and say that it can read and write data but can't create or change tables. The strings are in db_command.dart, db_ops.dart, and db_ui.dart in the Cloud CLI. The Cloud docs use the same word in cloud/concepts/database.md and the scloud db reference intro.

Cloud CLI 1.0.0, PostgreSQL 17.11.

Related: serverpod/serverpod_docs#853

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: cliIssues related to the Serverpod CLI.bugSomething isn't workingstake: cloudIssues that are prioritized for Serverpod Cloud.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions