fix(postgres): always-on is the database default; limits stops echoing a queued resize as applied

DE
4d ago
+0-0

Summary

Two fixes from SUP2-212.

  1. Default text. The platform now creates new databases always-on (INSTA_DB_ALWAYS_ON_DEFAULT, unset = true). The CLI still called scale-to-zero the default in three places: the postgres always-on help, the <redis|mysql|mongodb> always-on help, and the alwaysOnSetLine confirmation. They now name on as the default.

  2. postgres limits --cpu/--memory printed the old ceiling. In queue mode, insta-db answers a cpu/memory PATCH with a 202 carrying the instance row from before the patch, and the platform adapter marks it pending: true. dbLimits printed res.body.memoryMib, so a 4→2 GiB resize reported ceiling set to 4 vCPU / 4 GiB. The new limitsSetLine handles this the same way alwaysOnSetLine handles always-on:

status 202 || body.pending  ->  postgres db: ceiling 2Gi requested — the database has not applied it yet; confirm with `insta postgres limits db`
otherwise                   ->  postgres db: ceiling set to 2 vCPU / 2 GiB   (unchanged)

--json output is unchanged.

Not changed: service add postgres --always-on/--no-always-on is still refused client-side, though the platform accepts alwaysOn for databases. That is a product decision, left for a separate PR.

MCP parity: no new command. The MCP insta_add_service description fix is in a separate instacloud-mcp PR.

Gate: npm run typecheck && npm test passes (2168 tests).

Link to Devin session: https://app.devin.ai/sessions/f83fc3a442e04e68977df5231d77f3a2
Open in Devin Desktop: https://app.devin.ai/desktop/session/f83fc3a442e04e68977df5231d77f3a2?variant=devin
Requested by: @tonychang04


Summary by cubic

Updates CLI help and confirmations to reflect always-on as the default for new databases, and stops postgres limits from echoing the old applied ceiling when a resize is still queued.

  • on is now named as the default instead of scale-to-zero in the postgres always-on and <redis|mysql|mongodb> always-on help and the alwaysOnSetLine confirmation.
  • In queue mode, a 202 response with pending: true makes limitsSetLine report the requested ceiling as not yet applied and show the command to confirm later.
  • Successful synchronous resize confirmations and --json output are unchanged.