From 606ee6decfed80f7858af796ccb294b939f81ef1 Mon Sep 17 00:00:00 2001 From: Jaime Still Date: Tue, 24 Nov 2026 17:05:27 -0500 Subject: [PATCH] goal setup: the v1.data.extensions goal record --- context/goals/v1.data.extensions.md | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 context/goals/v1.data.extensions.md diff --git a/context/goals/v1.data.extensions.md b/context/goals/v1.data.extensions.md new file mode 100644 index 0000000..9375c68 --- /dev/null +++ b/context/goals/v1.data.extensions.md @@ -0,0 +1,40 @@ +# goal · v1.data.extensions + +- **State:** idle +- **Task:** none +- **Branch:** none + +## Tasks + +1. [ ] extension-stage +2. [ ] sqlint-extensions +3. [ ] pgvector-sql +4. [ ] pgvector-go +5. [ ] principles + +## Decisions + +- plan: The image is an extension's sole version source: `postgres:19.0-alpine` with each extension + built from source, pgvector pinned by `ARG PGVECTOR_VERSION`. Rejected: pgvector/pgvector's + Debian images, PGDG on Debian, and a version declared in Go. +- plan: Declarations live in `migrate.Options.Extensions` (name, optional removed state, no + version); the stage runs before every set under the migrator's lock, each in its own transaction, + in declared order. Rejected: an application-owned bottom set of up/down migrations. +- plan: The stage reconciles against `pg_available_extensions` with no history table; a mismatch + makes `Verify` unwrap to `ErrPending`; an unavailable version, or an installed one newer than the + image's with no path down, fails before any set runs. +- plan: A removed declaration runs `DROP EXTENSION IF EXISTS x RESTRICT` after the sets; deleting a + declaration never drops; Reset leaves extensions installed. +- plan: Shipped migration sets declare no extensions; only the application does. +- plan: sqlint's `extensions` key; a listed module exports forms, or `forms = []` with a `reason`, + or is refused. No sqlint check against `Options.Extensions`. +- plan: Module paths `sqlate/postgres/pgvector` and `go-database/postgres/pgvector`; the latter uses + pgvector-go's root module over `database/sql` and depends on the former's metric table. + +## Pending edits + +- coordinator · `references.md`: add the new sub-modules to sqlate's and go-database's entries, and + pgvector and pgvector-go under upstream sources. +- coordinator · `context/postgres-extensions.md`: delete it once `principles` promotes it, and + remove its `context/README.md` entry and the pointers in `data-intelligence.md` and + `migration-sets.md`.