Skip to content

Storage: add durable PostgreSQL drift store #194

Description

@BadgerOps

Follow-up to #187 and PR #188.

Summary

Implement a PostgreSQL-backed drift store so drift items and computed network conflict decisions are durable in Postgres deployments.

Why

PR #188 persists computed conflict decisions through the configured drift store. SQLite is durable, but the current PostgreSQL wiring still relies on the existing in-memory drift fallback.

Scope

  • Add Postgres migrations for drift_items equivalent to the SQLite schema.
  • Implement storage.DriftStore for Postgres.
  • Wire Postgres builds to use the durable drift store.
  • Add tests for create/get/list/update/delete behavior.

Acceptance Criteria

  • Postgres deployments retain drift and computed conflict decisions across process restarts.
  • Existing drift API behavior matches SQLite and memory implementations.
  • Postgres race tests cover the drift store path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions