Skip to content

PostgreSQL sink: add a pg.Pool error handler for resilience #1562

Description

@dcoric

Follow-up to #1497 / #1532.

ensurePool() in src/db/postgres/helper.ts creates new Pool({ connectionString }) with no 'error' listener. Per the node-postgres docs, an idle client that emits 'error' with no listener throws an uncaught exception and can crash the process.

Scope

Attach pool.on('error', …) to log and swallow idle-client errors so a transient backend hiccup doesn't take the proxy down.

Activity

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

Metadata

Metadata

Assignees

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