sincecutoff.com
← all changes

fly mpg users rotate-password rotates a managed Postgres user password

Introduced 2026-10-06 · score 0.94

HOW TO USE IT

For an MPG v2 cluster, run `fly mpg users rotate-password <CLUSTER_ID> --username <USER>` and confirm the rotation with `--yes` for noninteractive or JSON use. If the server reports `sessions_not_terminated`, print the current credentials and exit with failure; do not retry rotation.

fly mpg users rotate-password <CLUSTER_ID> --username <USER>
fly mpg users rotate-password <CLUSTER_ID> --username <USER> --yes --json
fly mpg users rotate-password <CLUSTER_ID> --username <USER> --kill-sessions --yes

WHY THIS HELPS

When rotating a managed Postgres user password, run the command and recover the current credentials if rotation succeeds but session termination fails.

REQUIREMENTS AND LIMITATIONS

  • Version: v0.4.113
  • CLUSTER_ID (required): Target cluster ID; required when using `--json`.
  • --username (required): User whose password to rotate; required with `--json` or in noninteractive use.
  • --yes: Skip confirmation; required for `--json` and noninteractive use.
  • --json: Output credentials as JSON; requires `--yes`, `CLUSTER_ID`, and `--username`.
  • --kill-sessions: Terminate the user's existing database sessions after rotation.
  • Prerequisite: The command requires an authenticated Fly session and a macaroon token.
  • Prerequisite: Supported only for MPG v2 clusters; v1 clusters must be migrated to v2 first.
  • Rotation requires explicit confirmation.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card