Skip to content

[P2] Recover PostgreSQL connectivity after a disconnect #53

Closed

Description

@michielbdejong

Recorded during review of main at a1eb305ccfa2f3fc8ddede4875765cf1b099bd2b. This issue records a finding only; no implementation changes were made or requested.

Finding

The application holds a single PostgreSQL client. When its connection task exits, it logs the error but does not reconnect or replace the client. Connection and credential operations then remain unavailable until the application restarts.

Evidence

Desired outcome

Use connection management with recovery and readiness reporting. Test loss and restoration of database connectivity without restarting the application.

Activity

  1. michielbdejong commented on Sep 16, 2026

    @michielbdejong
    ContributorAuthor

    Fixed in #73 — Security now holds its PostgreSQL client behind a background supervisor that reconnects with exponential backoff and swaps the shared client in automatically on recovery. Added Security::is_ready() and a /healthz endpoint. Covered by a test that kills the backend via pg_terminate_backend and confirms the connection self-heals without a restart.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions