ClickHouse / ClickHouse/clickhousectl
Define reliable Postgres create region and size diagnostics
- Dominant language
- Rust
- Stars
- 74
- Forks
- 5
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 196
Description
## Validated scope and current-PR plan — 2026-09-11
This section records the QA review and the current decision to finalize existing PRs without opening new PRs. It supersedes the proposed routing/fix suggestions in the original report below; the original observations are retained. Central plan: #757.
### Disposition
Deferred from this existing-PR finalization pass. Keep the issue open; no new PR is requested now. This is not a resolution, a severity downgrade, or a waiver of release acceptance.
### Validation and corrections
Current handlers relay these API errors. Improve contextual messages using the operation/field and typed error data; avoid inferring valid sizes by parsing a long prose error or guessing provider prefixes. Restart acknowledgement is not proof of completion. Coordinate lifecycle wording with #834; neither #788 timestamp normalization nor #799’s GCP example owns these changes.
---
## Original QA report
Found in the 2026-09-11 QA sweep of the combined PR stack at [`d2c37f81`](https://github.com/ClickHouse/clickhousectl/commit/d2c37f814fff53fe68d636e34103e2d0550bf84d), top PR #823, installed release build (package version still 0.4.2). Reproduced behaviour only; no implementation included.
Severity: medium.
```sh
clickhousectl cloud postgres create --name x --provider aws --region mars-1 --size c6gd.large
# Error: NOT_FOUND: Not Found # the word "region" never appears
clickhousectl cloud postgres create --name x --provider aws --size c4-standard-4 # a valid GCP size
# Error: BAD_REQUEST: Validation failed for following fields: size
clickhousectl cloud postgres create --name x --provider aws --size tiny.nano
# Error: BAD_REQUEST: request body.size: Value in not in c6gd.large,c6gd.xlarge,…(130 AWS+GCP sizes on one line)…
```
`--size` help is "Instance size (e.g. c6gd.xlarge); validated by the server" and there is no way to discover valid sizes or regions except a deliberately bad create.
`config patch` relays the API's advice verbatim: `You can restart the database by using the restart endpoint.` — should be rewritten to `clickhousectl cloud postgres restart `.
`restart` exits 0 and echoes the service with `state: running`; state never changes, a 1-second psql probe recorded zero downtime, and the only proof it happened was `pg_postmaster_start_time()` moving. Given the no-`--wait` policy, a stderr note ("Restart accepted; state does not change — verify with `SHOW ` / `pg_postmaster_start_time()`") is the right shape.
Suggested: rewrite the region/size API errors to name the field and, where the API gives a list, filter it by `--provider`; consider `postgres sizes`/`regions` discovery or listing them in README; rewrite the restart-endpoint prose; add the restart note.
Contributor guide
No contributing guide indexed for this repository
Research direction
The current issue defers changes during the existing-PR finalization pass and points to #757 for the central plan, so read that plan before starting work. Reproduce the examples with the listed `clickhousectl cloud postgres create` and `config patch` commands, then trace how the handlers relay API errors. Done means contextual diagnostics use the operation or field and typed error data, without guessing valid sizes from prose or provider prefixes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100