You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for a production-ready Postgres/Supabase backend for the memory store. #40 was a good start but was closed pending the following:
Required before merging
1. Tests
The SQLite store has a full test suite. Postgres needs equivalent coverage. A Docker-based Postgres in CI (e.g. services: postgres in GitHub Actions) is sufficient — no live database required.
2. OnLifecycleEvent implementation
The Store interface requires OnLifecycleEvent(MemoryEventHandler). The SQLite implementation emits EventCompressed and EventEvicted from its decay worker. The Postgres implementation currently registers a no-op, meaning:
Cache boundary hints are never fired for Postgres users
Decay lifecycle callbacks are silently dropped
Options:
Implement a polling-based decay worker for Postgres (e.g. periodic SELECT + UPDATE query)
Or explicitly document it as unsupported and return an error if a handler is registered
3. Build tag or separate binary pgx/v5 adds ~5MB to the binary even when Postgres is not used. Consider:
//go:build postgres tag so the default binary stays lean
Or a separate distill-postgres binary via GoReleaser
Activity