Document that cloud postgres delete needs no stop first - #625
Merged
sdairs merged 1 commit intoSep 3, 2026
Conversation
sdairs
force-pushed
the
feat/615-postgres-delete-force
branch
from
August 28, 2026 14:46
79f6415 to
5de6846
Compare
sdairs
force-pushed
the
feat/615-postgres-delete-force
branch
from
August 28, 2026 19:41
5de6846 to
a5b1ee8
Compare
sdairs
force-pushed
the
feat/615-postgres-delete-force
branch
from
September 1, 2026 15:05
a5b1ee8 to
c1399c7
Compare
`cloud service delete --force` exists because that API refuses to delete a
running service and there is a stop command to issue first. The Postgres API
has neither half: `DELETE .../postgres/{id}` declares no state precondition
and the state endpoint accepts only restart, promote and switchover. So a
`--force` flag here could only ever be a no-op, and a flag that does nothing
teaches the wrong thing about the one on `service delete`.
Instead, the command's CONTEXT FOR AGENTS block and the README example say
what is actually true: a Postgres service deletes from any state, including
'running', with no stop needed first.
Closes #615
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
sdairs
force-pushed
the
feat/615-postgres-delete-force
branch
from
September 1, 2026 20:36
c1399c7 to
e6c9022
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #615
What
Issue #615 asked for
--forceoncloud postgres deleteso a running Postgres service can be deleted in one step, mirroringcloud service delete --force. Investigating it showed the premise does not hold for Postgres, so this PR documents the actual behaviour instead of adding a flag.Why there is no flag
cloud service delete --forceexists because that API refuses to delete a running ClickHouse service and there is a stop command to issue first. The Postgres API has neither half:DELETE /v1/organizations/{organizationId}/postgres/{postgresId}declares no state precondition (checked against the live spec; the library's own integration cleanup,tests/common/support.rs::ensure_postgres_gone, deletes running services directly).PATCH /v1/organizations/{organizationId}/postgres/{postgresId}/stateaccepts onlyrestart,promoteandswitchover— there is no Postgres stop command.PostgresServiceSetStateCommandhas noStopvariant because the spec has no such value.A running Postgres service is therefore already deleted in one step, with no flag. An earlier revision of this PR added
--forceas an accepted no-op for surface parity; that was dropped in review — a flag that performs nothing teaches the wrong thing about the one onservice delete, which really does stop the service.Change
postgres deletegains aCONTEXT FOR AGENTShelp block stating that no stop is needed first because the Cloud API deletes a Postgres service from any state, includingrunning.postgres deleteexample says the same in one line.No code paths, request shapes, exit codes or
--jsonoutput change. Passing--forceremains a clap usage error (exit 2), as before.🤖 Generated with Claude Code