Connection pool for node-postgres built on top of generic-pool providing simplified query execution and raw connection management. Version 0.9.1 is the latest stable release. It supports ES6 features like Promises, Maps, and Sets, requiring Node >=4. The library offers a seamless interface for running queries without manually managing connections, while also allowing direct access to raw pg clients via acquire/release. It is configurable with pgOptions (for node-postgres client parameters) and poolOptions (for generic-pool configuration), and optionally supports native pg bindings. It is an alternative to other pooling solutions like pg-pool, but is less actively maintained.
npm install node-pg-connection-poolNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows creating a pool with custom configuration, running a parameterized query, and draining the pool.
Access result.rows for the rows array; other properties like command, rowCount are not available.
Use a try...finally block to ensure release() is called even on error.
Implement application-level retry logic or use a more robust pool like pg-pool.
Omit the name option; it has no behavior.
Skip pgNative: true unless you really need native bindings and have build tools installed.
Use pool.acquire(), then client.query('BEGIN'), etc., then release.Run 'npm install node-pg-connection-pool' in your project root.
Use 'const PgPool = require("node-pg-connection-pool");' and instantiate with 'new PgPool(...)'.Change the port in pgOptions or kill the other process.
Start PostgreSQL service or check connection parameters.