# postgres-connection-pool-test **Repository Path**: mirrors_dwyl/postgres-connection-pool-test ## Basic Information - **Project Name**: postgres-connection-pool-test - **Description**: :question: Experiment with PostgreSQL Connection Pool (Multiple HTTP Requests should not create multiple pg connections) - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-01-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # postgres-connection-pool-test ## Background While attempting to use PostgreSQL in our Node (Hapi) application, we were experiencing an issue when multiple connections were made. This issue is described in: https://github.com/brianc/node-postgres/issues/725 and a *potential* solution was suggested: https://github.com/brianc/node-postgres/issues/725#issuecomment-195718983 The code in `server.js` is copied from: https://github.com/brianc/node-postgres/wiki/Example (*with a few minor heroku-specific modifications made*) ## Findings Each HTTP request is inserting *two* records into the `visit` table, where we *expect* only *one* to be inserted ... ## Try it! We pushed the example up to Heroku: https://node-postgres-example.herokuapp.com/ When you refresh the page you see that the visit count goes up by ***two*** each time...! This is *obviously* not the *desired* behaviour ...