ha-pg logo

ha-pg

Node-Postgres for High Availability

0
0
PostgreSQLHigh-AvailabilityDatabaseNode.jsnode-postgres

About

ha-pg is an npm package that provides a high-availability wrapper for node-postgres, designed to enhance the resilience of applications using PostgreSQL. It addresses common issues encountered with node-postgres, particularly those related to network instability and client management within connection pools. The package aims to mitigate problems such as clients not being released after network issues, difficulty in detecting network disconnections or high latency, and pools failing to resolve pending client requests. The package primarily enhances the `Pool` class from node-postgres. Key features include emitting an error event when the `connect()` method fails and introducing an "allErrors" event type that consolidates error events from both the pool and its clients. It also implements a `recover()` method to free clients in an ended state and an optional `autoRecover` setting that automatically calls `recover()` and retries client acquisition upon failure. Additionally, ha-pg provides a `serverIsReachable()` method to check network connectivity to the database server. ha-pg is intended for developers seeking to improve the robustness of their Node.js applications that interact with PostgreSQL, especially in environments where network reliability or client pool management presents challenges. It offers a solution for issues like queries lasting indefinitely due to pending queues when no connection timeout is defined, and client references remaining usable after being released to the pool. The package currently has no external dependencies or dependents listed on npm.

#N/A
Rank
2
Upvotes
1
Reviews
Developer Tools
Category
Added July 28, 2025
Updated July 28, 2025

Reviews (1)

Sort by:
ttt2314
2 years ago
Solid testing & contribution to node-postgres recommended.
0
Please log in to leave a review.

Explore More Apps

SynchCast logo

One Laptop. Multiple Earphones

Audiowindows
51
SEODoC logo

All-in-one SEO tool for your website.

SEOmarketing
8
5-proxy.com logo

Compare Proxy Providers Verified re

proxyscrape tools
7
CrazyCubix logo

Play thousands of free online games

gamegame publisher
7
LiftOff Directory logo

Your launch pad for what's next.

SaaS
6
ShipBoard logo

Never build the wrong thing again

indiehackerfounder
8

Sponsored Apps

Afina Browser

Secure multi-environment browser

ArchOne AI

AI spatial design visualization

BasuTots

Calm puzzles for kids 2–6

BettingTracker.Pro

Sports performance analytics

Botflix

24/7 AI-produced TV & radio network

CachePilot

Telemetry for OpenAI apps

CardCutoff.com

Know the date each account reports

CharterPrep.AI

AI workspace for CA & CS prep

Contact Kickstart

Never lose a lead to paper again

Corvic

Agentic Document Processing

Double

AI career agent

ESPADLAND

Global Holding | Direct Selling

Ecqo

productivity unified

Faro

Faro tells your app — or your agent

FastTempMail

FastTempMail instant temp mail

GiftCrew

Share birthday wishlists with ease

Ginja

From chaos to clear next steps

Gutenslider

WordPress slider block image slider

HeySeo.app

Chat with your SEO data!

Hold My Frame

Frame library for film pitches

Honeyfield Marketing MCP

Run marketing ops from your chat

Human Write

Privacy-first writing tools

IDX Launchlab

Launch Token on Solana in 10 Mins

Insert Affiliate

In-app purchase affiliate tracking

Jely

Send vídeo to physical led screen

Joe Boulos Portfolio

Websites, apps and custom software

Kiffos

Your AI. Local, private, yours.

LanguageSource.io

Find shows by exact languages

Lift planner Pro

Lifting operations planning

Luna Notes AI

Luna Notes AI is an AI-powered note

Melovance

Piano practice more interactive

MindFlock

A private flock of coding agents -

OriaFlow

Apply smarter. Land faster.

Pannapdf

Your page your way

Photo From Emoji

Photo to emoji mosaic

RecoverFlow

Stop losing money to failed payment

RedHen Labs

RRW_Ads.com

Repair Rocket

Mobile mechanics' digital office

Ripple Brain

Copy. Create. Earn.

Securepasspro

The all-in-one security solution fo

Sentinel | Uptime Monitoring

Never lose customers to downtime

ShadowEvo AI Worksjop

Agentic workflow platform

ShipSignal.ai

Idea ->Build ->Ship->Leads

Show Bar

Windows-style Cmd+Tab for Mac

Social Forge

Find any creator on every network

StrideFuel

The AI-Powered Nutrition App

Talk Fusion

Video email and text technology

Tenwrite

Google Docs to WordPress & Blogger

Terralog

Private travel journal, no account

The GEO Visibility Kit

AI visibility for local businesses

Treasynx

Your money, planned by on-device AI

Vaultd

Memories organized by people

VeloceDB

Local engine. 30-day trial.

Zenfox.ai

The AI that works for you

aipetgenerator

AI pet portraits, music, 3d model

estockes

Stock charts, screener and strategy

exepal

The trusted toolbelt for AI agents

maxee.me

AI-powered business optimization

polyroom.

AI agents working together