Skip to content

Audit and validate the PostgreSQL shared driver #34

Description

@jamessewell

If you're a PostgreSQL expert, we'd love your help reviewing our shared Postgres driver.

What this driver does

The shared PostgreSQL driver (backends/shared/postgres/) powers two backends: ParadeDB and PostgreSQL FTS. Each registers separately with different default ports and env vars, but they share this single driver implementation.

It implements the Driver interface using pgxpool (jackc/pgx v5):

  • Exec — splits multi-statement SQL with pgsplit and executes each statement sequentially
  • Query — runs a query via the pool and counts returned rows as the hit count
  • Insert — bulk loads rows using PostgreSQL COPY protocol (pgx.CopyFrom)
  • Update — upserts using INSERT ... ON CONFLICT DO UPDATE with dynamically built parameterized queries
  • CaptureConfig — reads pg_settings GUCs and runs version queries, with extensible extra GUCs and custom queries for specializations (e.g. ParadeDB version info)

Connection pooling is configured with MaxConns=1, MinConns=1, 30m lifetime, 5m idle timeout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions