Create a temporary role with a TTL
postgres roles & traffic
// what it does
A role with --ttl stops authenticating when its lifespan ends — self-revoking access for debugging sessions, contractors, and one-off data fixes. role renew extends one that legitimately needs more time.
// shell
$ pscale role create mydb main hotfix-debug --inherited-roles pg_read_all_data --ttl 1h$ pscale role renew mydb main <role-id>// gotcha
Expiry cuts connections without ceremony. TTL roles are for humans and one-offs; long-lived services get non-TTL roles rotated deliberately with role reset.