Skip to content

Remove support for provisioning Postgres 16#239

Merged
sdairs merged 2 commits into
mainfrom
remove-postgres-16
Jun 4, 2026
Merged

Remove support for provisioning Postgres 16#239
sdairs merged 2 commits into
mainfrom
remove-postgres-16

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented Jun 3, 2026

Closes #238.

Deprecates provisioning of Postgres 16 across both local (Docker-backed) and cloud (ClickHouse Cloud API) commands. Going forward only Postgres 17 and 18 may be provisioned; 18 remains the default. Existing pg16 cloud services still deserialize (via the PgVersion::Unknown catch-all) — we only remove the ability to provision 16.

Changes

Provisioning gates (behavior change)

  • cloud/postgres.rs: KNOWN_PG_VERSIONS["18", "17"]; clap now rejects --pg-version 16 for create/update. Added a rejection test.
  • local/postgres.rs: validate_pg_tag accepts only 17/18; updated error message, doc comments, and accept/reject tests.

API library

  • models.rs: dropped the _16 variant from PgVersion (and its Display arm). The matching OpenAPI spec change (removing 16 from the pgVersion enum) is being merged upstream, so the library stays aligned. The vendored snapshot is intentionally not hand-edited — it's refreshed by the drift tooling when the spec change lands.

Docs & fixtures

  • README.md: supported-versions text, cloud --pg-version row, and local examples updated off 16.
  • local/cli.rs help text, plus local/mod.rs / local/server.rs test fixtures bumped off 16.

Out of scope

  • The ClickPipes CDC stage comment referencing a Postgres 16 replication source — not a CLI-provisioned service.

Verification

  • cargo build
  • cargo test — 300 CLI tests + cloud-api unit/spec-coverage tests pass
  • cargo clippy --all-targets -- -D warnings — clean

🤖 Generated with Claude Code


Note

Low Risk
User-facing version gate only; no auth or data-path changes, though scripts or docs that still target pg16 will fail at CLI validation.

Overview
Postgres 16 can no longer be provisioned through clickhousectl; only majors 17 and 18 are accepted (18 stays the default for local Docker).

Cloud postgres create / update now allow --pg-version only 17 or 18 via KNOWN_PG_VERSIONS and clap; a test asserts --pg-version 16 fails at parse time. Local local postgres start rejects 16.x image tags in validate_pg_tag, with updated CLI/README help and integration tests shifted to 17/18.

The PgVersion API enum drops the explicit 16 variant (aligned with the OpenAPI change); API responses that still return 16 should deserialize as Unknown("16") so existing cloud services remain readable without new provisioning paths.

Reviewed by Cursor Bugbot for commit e54c5a1. Bugbot is set up for automated code reviews on this repo. Configure here.

Closes #238. Postgres 16 is deprecated for provisioning across both local
(Docker-backed) and cloud (ClickHouse Cloud API) commands; only 17 and 18
may be provisioned, with 18 the default.

- cloud: drop "16" from KNOWN_PG_VERSIONS so clap rejects --pg-version 16 on
  create/update
- local: validate_pg_tag accepts only 17/18, with updated error message
- api library: drop the _16 variant from PgVersion (Unknown(String) catch-all
  retains deserialization of existing pg16 services); vendored OpenAPI snapshot
  is left to the drift tooling once the upstream spec change lands
- docs + test fixtures updated off 16

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sdairs sdairs requested a review from iskakaushik as a code owner June 3, 2026 20:56
@sdairs sdairs temporarily deployed to cloud-integration June 3, 2026 20:57 — with GitHub Actions Inactive
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 787b79c. Configure here.

"postgres version '{}' is not supported. Use a 16, 17, or 18 image tag \
(for example: 16, 16-alpine, 17.0, 18-bookworm).",
"postgres version '{}' is not supported. Use a 17 or 18 image tag \
(for example: 17, 17-alpine, 18.1, 18-bookworm).",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PG16 disambiguation blocked locally

High Severity

Rejecting major 16 in validate_pg_tag also runs when stop, remove, client, and dotenv resolve --version. After two majors share a name, --version 16 is required to manage an existing PG16 instance but now errors, so teardown and client access for that instance can fail while PG17 remains.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 787b79c. Configure here.

The edge-case battery still provisioned postgres:16, which is now
rejected by validate_pg_tag. Move single-version cases to 18-alpine,
switch per_version_isolation to 17+18, drop 16 from the majors loop,
and assert 16 is rejected alongside 14/19 in unsupported_majors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sdairs sdairs temporarily deployed to cloud-integration June 4, 2026 08:21 — with GitHub Actions Inactive
Copy link
Copy Markdown
Collaborator

@iskakaushik iskakaushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sdairs sdairs merged commit fb4b641 into main Jun 4, 2026
5 checks passed
@sdairs sdairs deleted the remove-postgres-16 branch June 4, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove support for postgres 16

2 participants