Skip to content

Connection pooling for server workloads (postgres Pool) #70

Description

@teetangh

Part of the complete-ORM roadmap. PostgresAdapter wraps a single pg.Connection; a Dart Frog server funnels all requests through one connection — serialized queries, one network stall blocks everything, and a dropped connection (without connectionFactory) takes the server down.

Scope

  • PostgresAdapter.pooled(Endpoint, settings, {int maxConnections}) backed by pg.Pool, implementing the same SqlDriverAdapter interface (withConnection per query, dedicated connection per transaction).
  • Keep the single-connection constructor for CLI/mobile use.
  • Health: surface pool stats; retire the ad-hoc SELECT 1 reconnect probe for pooled mode.

Directly benefits familiarise_mobile's backend under concurrent load (endpoint sweep ran 8 agents against one connection).

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