Skip to content

Create plan for PostgreSQL support in core service #221

@geoffjay

Description

@geoffjay

Context

The core service (#211) initially uses SQLite for simplicity, but future deployments may require PostgreSQL for better concurrency, scalability, and multi-instance support.

Summary

A plan needs to be created for adding PostgreSQL as an alternative database backend for the core service. This should be a separate effort tracked under its own plan.

Considerations

  • Abstract the storage layer behind a trait to support multiple backends
  • Use sqlx's compile-time query checking with both SQLite and PostgreSQL
  • Consider using feature flags (sqlite default, postgres optional)
  • Migration files need to be maintained for both dialects or use a compatible subset
  • Connection pooling configuration differences between SQLite and PostgreSQL
  • Environment-based database URL selection (DATABASE_URL)
  • Impact on deployment complexity (PostgreSQL requires an external service)
  • Consider whether other services (orchestrator, notify) should also support PostgreSQL

Notes

This issue is intentionally a plan marker — the actual implementation should be broken down into its own set of issues when the time comes. The core service should be designed with this future migration in mind by using trait-based storage abstractions from the start.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureCross-service architectural design or reviewcomplexity:mediumMedium scope: <200 lines, 1-2 filesneeds-decisionRequires a design or architecture decision before work beginsplanPlan issue for future workresearchResearch and investigation taskstriagedIssue has been triaged, ready for planning or implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions