Skip to content

feat(postgres): ship OrioleDB beside stock 15 and 17 - #315

Merged
avallete merged 10 commits into
mainfrom
avallete/orioledb-postgres-line
Oct 2, 2026
Merged

avallete merged 10 commits into
mainfrom
avallete/orioledb-postgres-line

Conversation

@avallete

@avallete avallete commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

TL;DR

Postgres slim images get a third release line, for Docker Hub tags 17.x.x.NNN-orioledb. It sits beside stock 15 and stock 17, so the new stack can run OrioleDB locally. The line follows immutable -rN revisions from #326. Each Oriole tag is built from its own upstream Dockerfile-orioledb-17, so 17.9.x and the 17.11.x tags in upstream ansible/vars.yml both match their docker.io images.

Before

flowchart LR
  A["Hub tag 17.x.x.NNN-orioledb"] --> B["ignored by poller"]
  C["Hub tag 15 / 17"] --> D["postgres-<upstream>-rN"]
Loading

After

flowchart LR
  A["Hub tag 17.x.x.NNN-orioledb"] --> B{"&lt;upstream&gt;-rN<br/>published?"}
  B -- yes --> S["skip"]
  B -- no --> C["dispatch; each line gets a turn"]
  C --> D["build psql_orioledb-17_cli_portable<br/>config from that tag's Dockerfile"]
  D --> E["parity vs docker.io tag"]
  E --> F["postgres-&lt;upstream&gt;-r0"]
Loading

Why

OrioleDB graduates to beta on Oct 1, and the CLI is dropping its experimental flag. Slim images only shipped stock 15 and 17. Upstream now pins postgresorioledb-17: "17.11.0.002-orioledb" beside 17.11.0.002 and 15.19.0.002 (vars.yml). The Oriole config also changed across those tags:

  • 17.9: orioledb is appended to the preload list.
  • beta18: adds output_plugin_libraries.
  • 17.11: orioledb moves to the front of the preload list.

What changed

  • Release line. New ^17\.[0-9]+\.[0-9]+\.[0-9]{3}-orioledb$ line with floor 17.9.0.028-orioledb. PG15 Oriole tags, arch-specific tags and other suffixes stay ignored.
  • Bundle. psql_orioledb-17_cli_portable is built from Dockerfile-orioledb-17:
    • orioledb is preloaded and default_table_access_method = orioledb.
    • 00-pre-init.sql creates the extension.
    • TimescaleDB and plv8 are omitted. PostGIS and pgRouting stay installed, as upstream ships them, but are removed from the supautils allowlist.
  • Per-tag config detection. The preload position and output_plugin_libraries are read from the selected tag's Dockerfile, not from a version comparison.
  • Receipts and identity. Smoke treats a Nix receipt version such as 17_20 or 17_22 as Oriole. UID/GID come from that Hub tag's digest.
  • Revisions. The poller counts an Oriole tag as published only once postgres-<upstream>-rN exists. The existing legacy postgres-17.9.0.028-orioledb is frozen and will be republished as -r0.
  • Fair dispatch. The poller skips published, active, cooling and settling tags first, then interleaves the three lines. A published stock prefix can no longer use up the Oriole turn.
  • Results and mirrors.
    • The manifest download, the README tables and the ECR/S3 audit keep one newest revision per line, keyed by upstream_version.
    • Table generation now fails loudly on a bad manifest.

After merge, the poller publishes the Oriole backlog as -r0: 17.9.0.028, 17.9.0.029, 17.11.0.001 and 17.11.0.002 (all -orioledb). To dispatch one by hand:

gh workflow run service-release.yml -f service=postgres -f version=17.11.0.002-orioledb

Validation

  • repository-checks passes. The poller, release-results and ecr-mirror tests cover one row per line and ignoring legacy releases.
  • service-release validation_only on this branch for every Oriole backlog tag: all green, including docker.io parity: 17.9.0.028, 17.9.0.029, 17.11.0.001, 17.11.0.002.

🤖 Generated with Claude Code

avallete and others added 7 commits September 22, 2026 11:12
Publish 17.x.x.NNN-orioledb as its own postgres release line so the portable bundle and derived image can track the OrioleDB engine without replacing the stock builds.
A partial results refresh must not drop the stock Postgres line, and an Oriole tag without postgresMajor must not fall back to the stock 17 bundle.
Round-robin only tags that can actually run, so a published or cooling prefix cannot use up another line's turn under the per-service cap.
The third release line is eligible from 17.9.0.028-orioledb, keeps its own ECR mirror slot, and records the published image size.
…tgres-line

Adapt the OrioleDB line to immutable -rN release revisions: a line counts
as published only once an <upstream>-rN release exists, manifests and
results tables key lines by upstream_version, and force-rebuild docs are
removed in favor of revisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onfig

Upstream 17.11 OrioleDB tags prepend orioledb to shared_preload_libraries
and beta18 tags add output_plugin_libraries; 17.9 tags append orioledb and
set neither. Detect both from the selected tag's Dockerfile-orioledb-17 so
every backlog tag matches its docker.io image.

Results tables now fail when manifest selection fails, ignore manifests
without upstream_version, and emit every release line so a missing line is
reported instead of silently dropped. Drop the redundant first interleave
in the poller and correct the OrioleDB extension wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@avallete avallete changed the title feat: ship OrioleDB Postgres beside stock 15 and 17 feat(postgres): ship OrioleDB beside stock 15 and 17 Sep 29, 2026
avallete and others added 2 commits September 30, 2026 11:29
Fail evaluation when Dockerfile-orioledb-17 adds orioledb in neither or
both known forms, or sets output_plugin_libraries in an unknown form.
Classify poll candidates once, drop the unreachable postgresMajor
fallback and the Postgres row alias, replace the smoke's Python receipt
classifier and its test hook with a bash helper, and remove docs that
repeated release-line data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-b39926

# Conflicts:
#	scripts/test-nix-release.sh
@avallete
avallete merged commit 605ef92 into main Oct 2, 2026
19 checks passed
@avallete
avallete deleted the avallete/orioledb-postgres-line branch October 2, 2026 16:13
TFSebben pushed a commit to TFSebben/supabase_cli that referenced this pull request Oct 9, 2026
## Summary

**TL;DR:** The experimental local stack can now run OrioleDB through
`db.orioledb_version`, on both the Docker and native runtimes. It uses
the new slim-services OrioleDB release line (`<upstream>-orioledb`). A
version without a published artifact fails closed, listing the supported
ones.

### Before

```mermaid
flowchart LR
  A["db.orioledb_version set"] --> B{"experimental stack?"}
  B -- yes --> C["error: unsupported by the experimental stack"]
  B -- no --> D["Compose: docker.io supabase/postgres:&lt;v&gt;-orioledb"]
```

### After

```mermaid
flowchart LR
  A["db.orioledb_version set"] --> B{"OrioleDB pin in catalog?"}
  B -- no --> C["fail closed: lists published versions"]
  B -- yes --> D["stack: slim &lt;v&gt;-orioledb-rN<br/>docker or native"]
  D --> E["db diff / declarative shadow<br/>use the same pin"]
  D --> F["data reuse only within<br/>the OrioleDB line"]
  G["slim-services publishes<br/>&lt;v&gt;-orioledb-r0"] --> H["catalog sync opens<br/>add postgres PR"]
  H --> B
```

### Why

OrioleDB is leaving experimental. The new stack rejected
`db.orioledb_version` with `db.orioledb_version is unsupported by the
experimental stack`. supabase/slim-services#315 now builds and publishes
OrioleDB as its own Postgres release line, next to stock 15 and 17, so
the stack can pin it like any other artifact.

### What changed

- **Catalog sync.** `-orioledb` releases form their own catalog line
(`17-orioledb`).
  - The first publish opens an `add` PR.
  - Later releases upgrade or hotfix that line on their own.
  - An OrioleDB release never touches the stock 17 pin, and the reverse.
  - Legacy tags without `-rN` are ignored.
- **One version resolver.** `db.orioledb_version` (and
`SUPABASE_DB_ORIOLEDB_VERSION`) resolves to `<v>-orioledb` through one
shared resolver. `stack start`, the `db diff` shadow and its cache key,
and the versions output all use it.
  - The setting requires `db.major_version = 17`.
  - An unpinned version fails with the list of published versions.
  - `postgresVersion("17")` still resolves to stock.
- **Data safety.** The ready-marker, `PG_VERSION` and snapshot checks
compare the engine line, not only the major. Stock and OrioleDB data,
snapshots and shadow caches never mix.
- Unmarked data, including data left behind by an interrupted first
start, is refused for an OrioleDB request.
  - The error suggests `supabase stack destroy`.
- Switching `orioledb_version` on a saved stack requires `stack
destroy`, because the stack keeps its database version.
- **`test db`.** Maps OrioleDB to its major for pg_prove.
- **Declarative shadow.** No CLI-side handling: pg-delta's Supabase
profile treats `orioledb` as a platform extension
([supabase/pg-toolbelt#513](supabase/pg-toolbelt#513)),
so declarative export never emits it and the diff never creates or drops
it. Shipped in pg-delta `1.0.0-alpha.58`, which this PR pins.
- **Compose.** With `SUPABASE_USE_SLIM_IMAGES`, Compose maps
`supabase/postgres:<v>-orioledb` to the pinned slim OrioleDB image.
Unpinned versions stay on docker.io.
- **Docs.** `stack-commands.md`, `SIDE_EFFECTS.md`,
`packages/stack/ARCHITECTURE.md` and ADR 0026.

It also pins the first published OrioleDB release,
`17.11.0.002-orioledb-r0`, added with the catalog sync's `--release`
mode. Later OrioleDB releases arrive through the existing
`slim-release-published` sync.

## Linked issue

Part of CLI-2387. Depends on supabase/slim-services#315.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants