Create an admin role

postgres roles & traffic

// what it does

--inherited-roles postgres grants the branch's full admin privileges — what your migration runner (Alembic, Drizzle, Flyway) needs to run DDL, create extensions, and manage other roles. Keep exactly one of these per environment and give apps lesser roles.

// shell

$ pscale role create mydb main migration-admin --inherited-roles postgres

// gotcha

Admin roles can drop tables and grant access; treat the credential like a root key. Applications serving traffic should run as a read/write role, never as admin — the blast radius of a leaked app credential shrinks dramatically.

// resources