CREATE ROLE are not managed on that page. You are responsible for their passwords, permissions, and lifecycle.
Default and user-defined roles
The defaultpostgres role is best reserved for administrative work. All application traffic should connect via user-defined roles with the least permissions that the connection needs.
Resetting the default role’s credentials replaces the password, so
every application using that role must be updated together.
User-defined roles can be rotated independently. The dashboard selects
pg_read_all_data and pg_write_all_data by default, which fits a typical
read-write application. Remove either permission when the application does not
need it.
Common role configurations are:
Create a role
- Dashboard
- CLI
1
Open the database, then go to Settings and select Roles.
2
Select the branch and click New role.
3
Enter a name and select the inherited roles that grant the required
permissions.Names can contain up to 63 lowercase letters, numbers, dashes, or
underscores. A name cannot start or end with a dash or underscore.
4
Create the role and save its password. Wait until the role is ready before
connecting with it. PlanetScale does not show the password again after you
leave the credentials view.
Available inherited roles
pg_read_all_data and pg_write_all_data grant data access. They do not grant
permission to create or alter tables. Add the postgres inherited role only
when the connection needs administrative access.
Neki enforces inherited-role dependencies. Selecting neki_viewer also
requires pg_read_all_data; selecting neki_operator also requires
postgres. Use separate least-privilege application and migration roles when
an application does not need DDL or workflow access.
The WITH REPLICATION attribute is available only when the role inherits
postgres. Enable it only for a client that needs to start logical
replication.
Connection credentials
Each managed role has:- A display name used in the dashboard.
- A generated Postgres login name.
- A password shown only after the role is created or reset.
- A branch assignment.
Manage a role
Resetting credentials creates a new password. Update every client that opens new connections with that role. Before deleting a user-defined role that owns tables, schemas, or other objects, reassign those objects to another role. If the role is still referenced by another object, Neki leaves it in place and reports that it cannot be deleted.- Dashboard
- CLI
From Settings > Roles, open a role to:
- View its connection strings.
- Rename its display name.
- Reset its credentials.
- Reassign objects it owns.
- Delete it.
postgres.
