8000 fix(memory): manage pgvector schema lifecycle by HoneyBBQ · Pull Request #819 · felinics/Memoh · GitHub
[go: up one dir, main page]

fix(memory): manage pgvector schema lifecycle - #819

Merged
sheepbox8646 merged 1 commit into
mainfrom
fix/pgvector-versioned-bootstrap
Jul 17, 2026
Merged

sheepbox8646 merged 1 commit into
mainfrom
fix/pgvector-versioned-bootstrap

Conversation

@HoneyBBQ
Copy link
Copy Markdown
Collaborator

Summary

  • move the optional pgvector schema into its own embedded golang-migrate stream
  • generate typed embedding queries through a second sqlc target and execute them through a shared pgx store
  • migrate once before pgvector type registration instead of running DDL from provider construction or Health
  • preserve existing unversioned embedding tables and rows when adopting migration version 1
  • keep pgvector optional: initialization failures disable the semantic index without preventing the main server from starting

This supersedes the narrower approach in #813 by covering constructor lifecycle, concurrent startup, schema versioning, shared connection ownership, and read-only health checks.

Validation

  • mise run lint
  • go test ./...
  • PostgreSQL 18 + pgvector integration coverage for concurrent migration, legacy adoption, typed upsert/search, schema drift, and future-version rejection
  • git diff --check

@sheepbox8646
sheepbox8646 merged commit 46fdfff into main Jul 17, 2026
12 checks passed
@chen-ran
chen-ran deleted the fix/pgvector-versioned-bootstrap branch September 11, 2026 12:35
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

0